How to Authenticate
As a Paychex partner, Your access token authorizes you to use the Paychex REST API server. To call a REST API in your integration, you'll need to exchange your client ID and client secret for an access token.
Open Postman and create a new Request
1. Open Postman
2. Click on New and choose HTTP Request.
3. Set the request method to POST
4. In the URL field, enter
https://api.paychex.com/auth/oauth/v2/token
Add Body Parameters
1. Go to the Body tab
2. Select x-www.form-urlencoded.
3. Add the following key/value pairs:
Key Value
grant_type client_credentials
client_id <Your CLIENT_ID here>
client_secret <Your CLIENT SECRET here>
Send the Request
1. Click the SEND Button
2. If the request is successful, you will be receiving a JSON response containing an access_token, token_type, expires_in, scope.
Alternatively, you can make use of the cURL given below by copying it, open Postman, click + to open New request, and paste the cURL in the URL field, replace CLIENT_IDand CLIENT_SECRET with yours and SEND to get the access token.
curl --location 'https://api.paychex.com/auth/oauth/v2/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'client_id=CLIENT_ID' \
--data-urlencode 'client_secret=CLIENT_SECRET'
Sample response
{
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJmYjYzMTM4Yy1kMWU3LTQzOGItYWI5NC01MmY4ZDYyNDAwMDAiLCJhdWQiOiJhcGkucGF5Y2hleC5jb20iLCJodHRwOi8vcGF5eC5jb20vc3ViIjoicGF5eHxmYjYzMTM4Yy1kMWU3LTQzOGItYWI5NC01MmY4ZDYyNDAwMDAiLCJhenAiOiJmYjYzMTM4Yy1kMWU3LTQzOGItYWI5NC01MmY4ZDYyNDAwMDAiLCJjb25zdW1lckluZGljYXRvciI6InBhciIsInNjb3BlIjoicmVhZDpjb21wYW55X3Blb3BsZSB3cml0ZTpjb21wYW55X3Blb3BsZSByZWFkOndvcmtlcnMiLCJpc3MiOiJodHRwczovL29pZGMucGF5Y2hleC5jb20iLCJkYXRhY2VudGVyIjoid2RjIiwiZXhwIjoxNzY3OTU4ODYzLCJpYXQiOjE3Njc5NTUyNjMsImp0aSI6IjNjOWYxMDUwLTZjZGItNGM0Mi1iZDU4LTViNDI2ZGJmNjM4dCJ9.tkFheMYZ12EiKvIJheghLcgi6yMsqGhM_aVbWOrtCL3ow1UiJqg_otH93pn4WTudOlljnF78wn7NDBLk009xZFpP2HFAs39YEl3riews8qqp2Bbj6MyxOuIqkQe7qdNcSNCmpHc0RHHko5R0quZZ7rukwoEgwbtT3CzmkaAOJ-2OubMP5vw9iuf0uMIJVZAtoZUHJa4AFn9wkb4X3ZyMJlB6wgtJJy2EG1ZWzqaoDrXl4ymNMifjwRN6IY6nN_fVeRtpSRiNtD-2AYwUy0Ayr1mSzl65XvcarwivVA2465lwmtpk6gCLkP3d4c3XQ1Jwp1c8W8_qSrSSaqviSfPWA",
"token_type": "Bearer",
"expires_in": 3599,
"scope": "read:company_people write:company_people read:workers"
}