OAuth2 Authentication Guide for Data as a Service

OAuth2 Authentication Guide for Data as a Service

Token Response

Token Response

If the credentials are valid, any of the above calls will result in an HTTP 200 response that includes JSON with the token information:
HTTP/1.1 200 OK Content-Type: application/json;charset=UTF-8 { "access_token": "e66ce8de3d87454eb236211b4005d570", "token_type": "", "expires_in": 863999, "example_parameter": "" }
The returned fields are:
  • access_token
    : the access token to be used in API calls
  • token_target
    : target can be any product
  • token_type
    : will always be blank
  • expires_in
    : number of seconds until this token expires - in this case 863999 seconds = approximately 10 days
  • example_parameter
    : will always be blank
A failed request will result in an HTTP 400 response that includes JSON with error information:
HTTP/1.1 400 Bad Request Content-Type: application/json;charset=UTF-8 { "error":"invalid_request" }
The
error
value could be any one of the following:
  • invalid_request
    : the client_id or client_secret field is missing
  • invalid_client
    : the credentials supplied were invalid
  • invalid_grant
    : the grant_type was not included or not set to client_credentials
  • unauthorized_client
    : this user is not authorized to request an access token
  • unsupported_grant_type
    : the grant_type was set to a valid value but not client_credentials
  • 500 Internal Server Error
    : an unexpected error occurred on the OAuth2 server

0 COMMENTS

We’d like to hear from you!