Public app on installation Returns 401 Unauthorized

Public app on installation Returns 401 Unauthorized

Aswinanand
Visitor
1 0 1

I have deployed Shopify public app few months back and since yesterday we noticed that, now users cannot install the application. It get installed and then uninstalled automatically. 

 

Unfortunately im not sure what changes happened after the deployment which is returning error now. On checking the log in Heroku gives the below log. 

 

HttpResponseError: Received an error response (401 Unauthorized) from Shopify:
"[API] Invalid API key or access token (unrecognized login or wrong password)"
at HttpResponseError.ShopifyError [as constructor] (/app/node_modules/@shopify/shopify-api/dist/error.js:13:28)
at new HttpResponseError (/app/node_modules/@shopify/shopify-api/dist/error.js:95:28)
at RestClient.<anonymous> (/app/node_modules/@shopify/shopify-api/dist/clients/http_client/http_client.js:230:55)
at step (/app/node_modules/@shopify/shopify-api/node_modules/tslib/tslib.js:143:27)
at Object.next (/app/node_modules/@shopify/shopify-api/node_modules/tslib/tslib.js:124:57)
at fulfilled (/app/node_modules/@shopify/shopify-api/node_modules/tslib/tslib.js:114:62)
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
code: 401,
statusText: 'Unauthorized'
}

 

 

Please help us out to resolve the issue. 

Thanks. 

Replies 2 (2)

flareAI
Shopify Partner
2405 224 549

Hello @Aswinanand,


Gina here from flareAI - your Fully Automated Free Sales Machine. Hope you are doing good! I am happy to share some suggestions for your query.


Please consider liking and accepting the solution if it helps.


A 401 error response from Shopify API refers to incorrect/missing authentication being sent with a request. Seems like the access token is invalid. Do you have any development store you are using for your app testing purpose?


I would suggest testing it and seeing any glitches. Also, make sure your Shopify API calls are correct. If the API endpoint is wrong, then also we can expect this kind of error.


Hope this helps


Gina
flareAI

flareAI : Get Sales from Google Search, on Autopilot
$10+ billion in eCommerce on Google Search, every day. Find out how much you are missing

SilasGrygier
Shopify Partner
19 2 7

Hi @Aswinanand, I'm not sure if this helps but the app-template has changed their token usage by using offline access tokens by default now so perhaps your application is using expired online tokens instead of storing and working with offline access tokens.