# Access Token not recognized

**URL:** <https://community.shopify.dev/t/access-token-not-recognized/32042>\
**Category:** Authentication & Access\
**Tags:** oauth\
**Created:** [March 9, 2026, 2:56pm UTC](https://community.shopify.dev/t/access-token-not-recognized/32042 "2026-03-09T14:56:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Servitel](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@Servitel](https://community.shopify.dev/u/Servitel)\
**Post date:** [March 9, 2026, 2:56pm UTC](https://community.shopify.dev/t/access-token-not-recognized/32042/1 "2026-03-09T14:56:23Z")

</div>

Hi to everybody.I’m in trouble because the code received is not recognized by Shopify.I create the code by calling this url:https://{shop\_name}.myshopify.com/admin/oauth/authorize

The redirect url receive the call containing the code. The code received is like this: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

Then I try to retrieve products with this call:

https://{shop\_name}.myshopify.com/admin/api/2026-01/products.json?limit=250

passing in the header this:

‘X-Shopify-Access-Token:{code}’ and 'Content-Type: application/json’

I receive this answer:

{“errors”:“[API] Invalid API key or access token (unrecognized login or wrong password)”}

The time passed between code is received and the call for products list is done is 30 seconds around.I don’t know where I can find the API key, I pass the access token only (the code I receive with create code call)Where I’m wrong ?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![Dylan](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/dylan/32/90_2.png) [@Dylan](https://community.shopify.dev/u/Dylan)\
**Post date:** [March 9, 2026, 3:02pm UTC](https://community.shopify.dev/t/access-token-not-recognized/32042/2 "2026-03-09T15:02:55Z")

</div>

Hi @Servitel

Please refrain from sharing access codes in public forums like this, I’m not sure if that’s a real credential or for your a test store but you’ve just exposed it to the public web. I highly recommend you rotate that credential.

I went ahead and edited that out, but it has already been exposed.

That said, I noticed the format of the access token wasn’t what I normally see. Typically access tokens start with `shpat_`so that way you can tell they are shop private access tokens.

The code you’re seeing is most likely the OAuth grant code, which is used to prove the redirect after the merchant authorizes your app.

---

<div class="post-metadata">

**Author:** ![Alan\_G](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/alan_g/32/5321_2.png) [@Alan\_G](https://community.shopify.dev/u/Alan_G)\
**Post date:** [March 10, 2026, 3:07pm UTC](https://community.shopify.dev/t/access-token-not-recognized/32042/3 "2026-03-10T15:07:16Z")

</div>

Hey folks 👋 - I agree with @Dylan here (though I can’t see the token anymore - thanks for hiding that!).

@Servitel, I’d just double check to make sure you’re converting your Authorization Code into an access token after the OAuth redirect:

> **[Anchor to Step 4: Get an access tokenStep 4: Get an access token - Implement...](https://shopify.dev/docs/apps/build/authentication-authorization/access-tokens/authorization-code-grant#step-4-get-an-access-token)**
>
> All Shopify app templates already have authorization code grant implemented. If you're using one of these templates, then you don't need to follow this tutorial. To save time and keep your app secure, Shopify recommends using an app template. | Learn...

Hope this helps!
