oauth-token

Create OAuth2 access token

POST request to create an access token. The access token can be used to authorize external requests.

post/oauth/token

Request

  • Base URL: https://api.hoorayhr.io
  • URL: https://api.hoorayhr.io/oauth/token
  • Auth: none required

Query parameters

grant_typestring required
Example:authorization_code

The grant_type of the request. Since the API only handles authorization codes, provide the value "authorization_code".

codestring required
Example:dd7c1a3d9d5627da9aea5415e3d07202bfb5925e

The authorization code to exchange. Use the /oauth/authorize endpoint to get an authorization code.

redirect_uristring url required
Example:https://www.integration-partner.com/hooray-hr-integration

The redirect_uri that was used to get the authorization code. The URI must be identical to the value provided earlier.

client_idstring required
Example:00D26507EEA436A3DA9E70B135189A6F

Unique id of the client that performs the request. The id should be valid and identical to the client_id used to get the authorization code.

client_secretstring required
Example:73B67F38F527859521767EBBE6CDE5D9

Secret key of the client that performs the request. The secret must match the client_id. Keep this value secret and secure at all times.

Request body

object required

Response

success

access_tokenstring

512 bit hexadecimal access token that grants access to the API. Store this token securely!

token_typestring

Indicates what kind of token is given. In this case, the access_token is a Bearer token. Meaning everyone who owns the token has access.

Example response

{
  "access_token": "aeae379a6e857728e44164267fdb7a0e27b205d757cc19899586c89dbb221930f1813d02ff93a661859bc17065eac4d6edf3c38a034e6283a84754d52917e5b0",
  "token_type": "bearer"
}

Changes

No recorded changes to this operation across all 1 revision of this API.