Authentication

Get your API token

Once you are logged in to your dashboard navigate to API access and create an API token.

You can name your token, so you know where this one is going to be used, in case you ever need to revoke it.

r4nkt API access

Once you create a token, it will be shown only once to you. Make sure to store it safely. After it is shown it can only be revoked, in which case you will need to generate a new token for use.

Once you have your token, you can authenticate against the API.

Authenticate against the API

The token you've received can be used in the Authorization header.

Here's a curl example of how you can authenticate against the API. In this example, it will list all games in your account.

$ curl https://api.r4nkt.com/v1/games \
-H 'Authorization: Bearer bgUKSWYL30iHg5w0WTDGHfubt5L1HBTr0atAehCeSqwNTqkU9rOmsNEmWf6Y' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json'

The token bgUKSWYL30iHg5w0WTDGHfubt5L1HBTr0atAehCeSqwNTqkU9rOmsNEmWf6Y is used to authenticate. The /v1/games endpoint is hit to retrieve all games. The resulting response payload may look like this:

{
"data": [
{
"game_id": "58GQ3P0KJP",
"name": "My Game",
"description": "This is my game.",
"created_at": "2019-11-18 17:02:30",
"updated_at": "2019-11-20 08:56:05"
},
{
"game_id": "W810YG0KJE",
"name": "My Other Game",
"description": "This is my other game.",
"created_at": "2019-11-20 09:03:49",
"updated_at": "2019-11-20 09:04:19"
}
]
}