Request Access Token

Requirements

Each API call requires an access token to be passed along for authentication purposes. An access token is attached to the consumer application's key and secret plus the end-user WHCC account and allows access to the WHCC account without using the WHCC account password.

In most cases the WHCC account you will be using is attached to your consumer key. An access token is valid for an hour, so you should request a new token each time you have a set of API calls to make.

As a general rule, we'd suggest requesting a new access token for each order and using the same token for both /api/OrderImport and /api/OrderImport/Submit calls.

GET /api/AccessToken

Content-type: application/json

curl

Example Request
1
2
3
4
5
curl https://apps.whcc.com/api/AccessToken \
	-d grant_type=consumer_credentials \
	-d consumer_key=B431BE78D2E9FFFE3709 \
	-d consumer_secret=RkZGRTM3MDk= \
	-X GET 
Copy to Clipboard
Example Response
1
2
3
4
5
6
7
{
	"ClientId": "10072",
	"ConsumerKey": "B431BE78D2E9FFFE3709",
	"EffectiveDate": "8/19/2018 3:10:26 PM CST",
	"ExpirationDate": "8/19/2018 4:10:26 PM CST",
	"Token": "835770680158"
}
Back to Top 👆
Get in Touch

Interested in integrating with WHCC? Tell us more about what you’re looking for and we’ll be in touch.