API Token

Create a Token

In order to access the Select Star API, you'll need to first generate a token.
In your Account Settings page, under Client API Token, click on Manage API Tokens :
Then, in the modal, click on the Create button.
Copy the text in the API Token field to use as the token in API requests.
API tokens have no expiration, but they can be deleted and then recreated manually.

Making Authenticated Requests

All Select Star API endpoints require authentication, so the token must be included it in all requests. Set the Authorization header for bearer authentication like the following:
1
Authorization: Token <token>
Copied!
Please note that for authorization type, you must use Token and not Bearer
For example, in curl, set the header using the -H flag:
1
curl https://api.production.selectstar.com/v1/tables/ -H "Authorization: Token <your_token>"
Copied!
If the token is missing or invalid, the endpoint will return 401: Unauthorized with one of the following messages in the body:
1
{
2
"detail": "Authentication credentials were not provided."
3
}
Copied!
1
{
2
"detail": "Given token not valid for any token type",
3
"code": "token_not_valid",
4
"messages": [
5
{
6
"token_class": "AccessToken",
7
"token_type": "access",
8
"message": "Token is invalid or expired"
9
}
10
]
11
}
Copied!