PHPackages                             statscore/apiclient - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. statscore/apiclient

ActiveLibrary[API Development](/categories/api)

statscore/apiclient
===================

STATSCORE Official SportsAPI Client

v1.0.1(6y ago)2291[2 issues](https://github.com/statscore/apiclient/issues)[2 PRs](https://github.com/statscore/apiclient/pulls)GPL-3.0-or-laterPHPPHP &gt;=7.3

Since Oct 4Pushed 3y agoCompare

[ Source](https://github.com/statscore/apiclient)[ Packagist](https://packagist.org/packages/statscore/apiclient)[ Docs](https://github.com/statscore/apiclient)[ RSS](/packages/statscore-apiclient/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (8)Versions (6)Used By (0)

[![sportsapi](https://camo.githubusercontent.com/c18d81e30cc92518529e66231c751ce163e2e19886bcd5ec6bd23798c0f620a5/68747470733a2f2f7374617473636f72652d73332d63646e2e7374617473636f72652e636f6d2f76322f70726f64756374732f73706f7274734150492f7370612d6c6f676f2e706e67)](https://camo.githubusercontent.com/c18d81e30cc92518529e66231c751ce163e2e19886bcd5ec6bd23798c0f620a5/68747470733a2f2f7374617473636f72652d73332d63646e2e7374617473636f72652e636f6d2f76322f70726f64756374732f73706f7274734150492f7370612d6c6f676f2e706e67) STATSCORE Official SportsAPI Client
==================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#-statscore-official-sportsapi-client)

[![Build Status](https://camo.githubusercontent.com/7c7cf798c4ace9ec44ba2f7961d438da906c9a62f420f274ac8e60bf840ac94a/68747470733a2f2f7472617669732d63692e6f72672f7374617473636f72652f617069636c69656e742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/statscore/apiclient)[![Packagist](https://camo.githubusercontent.com/4c61793a053208328283c6d3d56e142334b42fe0dd0d07fb2901bdf741e0b231/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7374617473636f72652f617069636c69656e742e737667)](https://packagist.org/packages/statscore/apiclient)[![codecov](https://camo.githubusercontent.com/5027a21ec5788dd434518bcd8fd9a22f1317626a2e6c7f69f66632f8ed147f25/68747470733a2f2f636f6465636f762e696f2f67682f7374617473636f72652f617069636c69656e742f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/statscore/apiclient)[![PHP from Travis config](https://camo.githubusercontent.com/01dfb8d9d3e79a7c9ecb8b5cb83039b4ac929fbeac6a99539988c19c5e489af6/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7068702d762f7374617473636f72652f617069636c69656e742f6d61737465722e737667)](https://travis-ci.org/statscore/apiclient)[![Quality Gate Status](https://camo.githubusercontent.com/61f00afdc7703344755ee66b49b6715dcc28218d4fc1b6ccfd536734b7c182ea/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d7374617473636f72655f617069636c69656e74266d65747269633d616c6572745f737461747573)](https://sonarcloud.io/dashboard?id=statscore_apiclient)[![Libraries.io dependency status for GitHub repo](https://camo.githubusercontent.com/630607927bf9df7e5568c13433ce4a423b14ee5389ca764e0098266a6c96a6f6/68747470733a2f2f696d672e736869656c64732e696f2f6c6962726172696573696f2f6769746875622f7374617473636f72652f617069636c69656e74)](https://libraries.io/github/statscore/apiclient)

The API service is based on the REST architecture and supports a number of resources accessed with HTTP protocol. The client should send a HTTP GET request and in return will receive a return list document in JSON or XML format. The default response format is JSON.

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Examples](#examples)
    - [Authentication](#authentication)
    - [Booked Events](#booked-events)
- [Troubleshooting](#troubleshooting)

Installation
------------

[](#installation)

### Prerequisites

[](#prerequisites)

- PHP version &gt;=7.2
- [ext-json](https://www.php.net/manual/en/book.json.php) required

### Documentation

[](#documentation)

- [API Documentation](https://docs.api.statscore.com/?version=latest)

### Hot to install package

[](#hot-to-install-package)

Use [Composer](http://getcomposer.org) to install the latest version with command:

```
$ composer require statscore/apiclient
```

or add our package to your `composer.json` file.

```
{
  "require": {
    "statscore/apiclient": "^1"
  }
}
```

Examples
--------

[](#examples)

### Authentication

[](#authentication)

Access to the API is based on the [oAuth 2.0](https://oauth.net/2/) authorization method. This means access is given using a unique token without any IP's restriction.

The client is authenticated using a GET request including query string parameters: client\_id and secret\_key. These parameters are assigned to you by our sales department. On confirmation of the client\_id/secret\_key combination, the special oAuth token is then returned. Maximum period of time the token is valid is 24 hours from the time it was generated. This token should be sent with all subsequent requests.

```
