Documentation is now available for the Fall 2020 Update release!

Get OAuth2 access token with client credentials

This endpoint is used to generate an access token using client credentials.

Leave Feedback

URL

POST https://api.opsramp.com/auth/oauth/token

Sample URLs

https://{api-url}/auth/oauth/token

This access token is used at the partner-level for deleting the client’s first response policy.

Header format

HeaderValue
AuthorizationBearer {accessToken}
Content-typeapplication/octet-stream
Acceptapplication/octet-stream

Form fields

Form FieldDescription/Value
client_idClient ID (key)
client_secretSecret Key generated along with token (secret).
grant_typeCredentials of client.

Status code

200 OK

Sample response

{
  "access_token" : "6b4a5f03-7d49-4915-9792-2d964806cbd1",
  "token_type" : "bearer",
  "expires_in" : 5999,
  "scope" : "read write"
}

Possible errors

Response codeReasonSample response
401 UnauthorizedFor invalid/key combinations.{"error": "unauthorized", "error_description": "Bad API credentials"}
400 Bad RequestFor invalid grant_type values.{"error": "unsupported_grant_type", "error_description": "Unsupported grant type: user_password"}