Authentication
In order to authenticate with the Scored API, you must first have your api_key
and your api_secret
. These values will need to be sent with every authenticated request.
API tokens do not typically expire.
While you can retrieve API tokens via the API, we recommend that you extract your tokens manually for your first request.
To do this, log in to your account on the web interface, and find the api_key
and api_secret
values in your browser's localStorage
.
Alternatively, you can run the following in your browser's console:
localStorage.getItem('api_key');
localStorage.getItem('api_secret');
Authenticating a Request
The api_key
and api_secret
values should be sent with every authenticated request as header values, X-API-KEY
and X-API-SECRET
respectively.
Example
X-API-KEY: aB3dE/4fGhIjKlMnOpQrStUvWxYz0/2=5=6b7c
X-API-SECRET: 9jLmN/oPqRst1U2vW3xYz4A/5BcD=6EfG7h8I
These are not your credentials - for demo only.
Unauthenticated Requests
You can opt to not authenticate your requests, however you will not be able to vote, create posts or comments, or any other action which requires users to be logged in.
You will be able to read posts and comments.