GraphQL occassionally responds with a HTML login - Desktop App (VBA)

New Member
3 0 0

Hello Everyone.

A bit of help would be appreciated.

I've been successfully using the API for years... pulling information into Excel to help me manage draft orders (quotes in my case) . About a month ago, I was pleased with myself as I got GraphQL working to pull in the events held against a draft. I could then count how many times an invoice had been sent and make decisions on the back of that... e.g. offer a last minute discount, delete drafts that had gone stale, etc

The problem I have been experiencing is that at least once a day I get about 1-2hr periods when the GraphQL responds with the HTML of the Shopify login page. This is directly after doing a standard get_drafts API call which works every time.

If I were to try the same API call in a client like Postmaster (Insomnia in my case).. it just works.

Is there some sort of session based auth going on? I can't work out why it's fine for 70% of the time and not for the rest.

Penny for your thoughts please?

Replies 2 (2)
Shopify Staff
154 24 25

Hi @Chris_West 

This is most likely being caused by an expired cookie. I would recommend clearing cookies from your app regularly which should prevent this behaviour from occurring.


CS | API 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 or the Shopify Web Design and Development Blog

New Member
3 0 0

Hi @csam 

Thanks for the response. Good thinking!
I'll take a look, but not a great deal of literature around ancient VB and cookies.