In order to communicate with our API you need to identify yourself. The API implements a scaled down version of the OAuth2.0 protocol for authentication, and all end-points require an access token obtained through the /oauth/access_token endpoint.
Obtaining an access token
#Request token: curl -X POST -d \ 'grant_type=client_credentials&client_id=my_client_id&client_secret=my_secret' \ https://api.abiosgaming.com/v2/oauth/access_token
//Response: { "access_token":"u8vhWfs07Y7PuhdSJAqyPYKbDAHsZdNKW6Df9WYJ", "token_type":"Bearer", "expires_in":3600 }
The access token is then placed in the url of each request sent to the API for authentication.
Each access_token is valid for 1 hour and it is not possible to create a new one until the last 10 minutes of the current access_tokens life time. In other words, if you try to create a new access_token via the /oauth/access_token endpoint within 50 minutes of the creation of an access_token, you will receive the same access_token back again.
Using an access token to request data
#Request with token: curl -X GET "https://api.abiosgaming.com/v2/games?q=counter&access_token=your-token-here"
//Response: { "id": 5, "title": "CS:GO", "long_title": "Counter-Strike: Global Offensive", "deleted_at": null, "images": { "square": "https://img.abiosgaming.com/games/CSGO-flat-game-icon.png", "circle": "https://img.abiosgaming.com/games/round-cs-logo.png", "rectangle": "https://img.abiosgaming.com/games/flat-rectangular-cs-go-logo.jpg" }, "color": "23d43f" }
Updated 3 years ago