Invalid API key or access token for API request with access token

Highlighted
Tourist
9 1 4

Hello,

I'm sorry when this question got asked many times before, but I'm trying to make an  authenticated request to write a customer from a nodejs backend, with a valid access token and I'm just getting

 

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

as response and I don't know what is wrong with the request.

 

This is the x-request-id:

'x-request-id': 'ba744124-32b9-4589-84b8-adae74fac0cf'

As http headers I'm setting:

'X-Shopify-Access-Token': accessToken,
'Content-Type': 'application/json'

with a valid access token and the payload looks like this:

{
  "customer":
  {
    "first_name":"Dummy",
    "last_name":"Dummy",
    "email":"blabla@lalal.com"
  }
}

Maybe someone knows what's wrong here.

 

Thanks,

Michael

0 Likes
Highlighted
Shopify Staff
Shopify Staff
495 97 88

Can you try with Basic Auth setup? https://shopify.dev/tutorials/authenticate-a-private-app-with-shopify-admin#basic-authentication

Vix | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 


0 Likes
Highlighted
Tourist
9 1 4

Thanks @vix.

I tried this before, and still the request fails with the same error message.

 

'X-Request-ID',
      'd32abd3f-2c10-44d7-a10d-7b2a59566990'

And i have a custom app.

 

0 Likes
Highlighted
Tourist
9 1 4

Is there anything new on this? It would help me a lot if i could have some information why the requests fail. Thanks!

0 Likes