Generate access token
POST {{base_url}}/oauth2/token
To use the Exercises API, your app must send an OAuth2 access token in an Authorization header with each request.
- Provide your
client_id
andclient_secret
to make aPOST
request tohttps://api.exercises.com/oauth2/token
. - A successful response will include the access token that should be included as an Authorization header to authorize all subsequent requests to the Exercises API.
Request Body
[{"name"=>"client_id", "value"=>"{{client_id}}", "datatype"=>"string"}, {"name"=>"client_secret", "value"=>"{{client_secret}}", "datatype"=>"string"}, {"name"=>"grant_type", "value"=>"client_credentials", "datatype"=>"string"}, {"name"=>"scope", "value"=>"public", "datatype"=>"string"}]
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string |
RESPONSES
status: Created
{"access_token":"C443298LsScW8grhoWp24a0dhnjkr","status":"active","created_date":"July 19th 2018, 11:51:24 pm"}