POSTing to admin API returns 401

8 0 3


I'm trying to POST to the Admin API in order to register a webhook. I'm using the following code in a Node.js environment to make the post through Axios:


// register shopify webhooks
          webhook: {
            topic: "app/uninstalled",
            format: "json",
        { headers: { "Content-Type": "application/json", "X-Shopify-Access-Token": shopData.accessToken } }


Assume shopData.accessToken is the stored access token that I saved when I completed oauth of my shopify node app as I installed it on my test shop. It is NOT my app API key or API secret key.

I don't understand why I'm getting a 401. What am I doing wrong here?

Replies 0 (0)