"type":"token.unauthorized_access","message":"Invalid API Key"

Hello,

I just try to use your product.

I have this return:

{
  "request_id": "efb192e2-b764-4d1a-a288-7ca6a87806d6",
  "error": {
    "type": "token.unauthorized_access",
    "message": "Invalid API Key"
  }
}

I well change ‘YOUR_API_KEY’.

Can you help me ?

Best regards,
Nicolas

Hi @nicodumans, thanks for reaching out!

I notice you receive Invalid API Key, did you replace YOUR_API_KEY with a API Key created on the Nylas Dashboard for the specific application?

The API Key value will start with something like nyk_

@ram
I am getting the same problem in the sandbox app

I did replace the “YOUR_API_KEY”, I tried replacing manually, also the UI replaces it automatically (there is even a comment at the top of the code snippet in the UI saying they did it for me)
I tried regenerating the api key and replacing again
recreating the app
recreating the grant

nothing worked, any clues?

EDIT: It worked when I recreated the app with USA data residency, this isn’t good for me because I work in Europe, you should probably check this out

Hello @ram

Yes I do that. :smiling_face_with_tear:

Hi @guyh, thanks for sharing, just to clarify your comment:

EDIT: It worked when I recreated the app with USA data residency, this isn’t good for me because I work in Europe, you should probably check this out

Were you using an US Region Nylas API Key with the EU Nylas API URL (https://api.eu.nylas.com)causing the error?