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.

  1. Provide your client_id and client_secret to make a POST request to https://api.exercises.com/oauth2/token.
  2. 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

KeyDatatypeRequiredDescription
Content-Typestring

RESPONSES

status: Created

{"access_token":"C443298LsScW8grhoWp24a0dhnjkr","status":"active","created_date":"July 19th 2018, 11:51:24 pm"}