API References
Endpoints: https://api.paychex.com/auth/oauth/v2/token
Verbs supported: POST
POST: Request a Bearer token that will be used as an access token when making calls to resources. The credentials can be sent within the URL or within the body of the request. The returned token will be needed for Authorization when making calls to the other API resources.
URL: https://api.paychex.com/auth/oauth/v2/token?grant_type=client_credentials&client_id={client_id}&client_secret={client_secret}
Body: grant_type=client_credentials&client_id={client_id}&client_secret={client_secret}
Request:
Element Name | Type | Description |
---|---|---|
client_id | string | The applications API key. |
client_secret | string | The applications corresponding secret. |
grant_type | string | Send "client_credentials". |
Response:
Element Name | Type | Description |
---|---|---|
access_token | string | The token which will be used for making future calls. |
expires_in | string | Number of seconds remaining before the token expires. |
scope | string | This will always return "oob" (out of band) based on OAuth configuration. |
token_type | string | This will always return "Bearer" based on OAuth configuration. |
{
"access_token": "99f9c30a-8134-4a30-a789-7c7665add41e",
"token_type": "Bearer",
"expires_in": 600,
"scope": "oob"
}