GraphQL API suddenly return "Invalid API key or access token" error

ykyuen
New Member
7 0 0

Hi all,

I am uploading product images (> 20,000) thru the GraphQL API. The program is single thread so the upload request will be sent one by one in order to avoid throttling. Everything works fine but after uploaded about 2,000 images. The requests started to fail with the following error.

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

 

Then i stopped the running process and started over again. At first the requests continued to fail with another error.

Undefined error response (possibly timeout by server)

 

But after a while, the upload resumed to normal. I wonder if it is somehow related to the API rate limit but i have no idea how to verify the root cause of the problem.

Any suggestions are appreciated.

Regards,
Kit

0 Likes
vix
Shopify Staff
Shopify Staff
534 105 103

Hi @ykyuen 

Do you have a request ID for a call where you saw this error from the past week?

 
 

Vix | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

0 Likes
ykyuen
New Member
7 0 0

Hi Vix,

Thanks for your reply. Unfortunately, I dun have the request ID.

The upload is triggered by clicking a button on the private shopify app UI and i met the same error again the next day after uploading the images for > 20 hours.

When the problem occured, i found that any buttons i clicked on the app UI will fail and i have to refresh the page in order to get them working again. I guess it is becoz after a long period of time, the authentication has expired so the request failed.

Anyway, i finally uploaded all the images. Thanks again.

Regards,
Kit

0 Likes