Best way to see if OAuth Token is valid

New Member
13 0 0

What is the best way to see if OAuth Token is valid?

0 Likes
Highlighted
Shopify Staff
Shopify Staff
591 0 44

Make an API to /admin/shop.json request and see if you get a 401.

1 Like
New Member
13 0 0

Hey Chris,

The response that I get from making an API call to /admin/shop.json for an invalid OAuth Token is:

[API] Invalid API key or access token (unrecognized login or wrong password)

Is this what I should be seeing?


 

0 Likes
Shopify Staff
Shopify Staff
591 0 44

Take a look at your servers response code. It's most likely a 401, but that's how you know for sure that your API request was denied due to invalid access tokens

0 Likes
New Member
13 0 0

Thanks Chris! I've found it!

0 Likes