Request Access Token

The Order Submit API exposes an authentication endpoint which will return a token with a one hour lifetime. The token applies the default WHCC account for the consumer and cannot be refreshed.

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"
}

What's Next

Explore the Product Catalog

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.