"Invalid server key" when trying the auth token endpoint

Hello there!

We followed the documentation in order to generate a server key as described here: Security - Amity Docs, but unfortunately, no matter what, we are getting the “invalid server key” message.

For example with curl:

$ curl 'https://api.amity.co/api/v3/authentication/token?userId=1234' -H 'x-server-key: <redacted>'
    "status": "error",
    "message": "Invalid server key",
    "code": 400100

Any advice?

Hi @george.papadopoulos - could you please check if your app is provisioned in the the region the endpoint is pointing to? If your app is created in US or EU region you should change your API endpoint to https://api.us.amity.co or https://api.eu.amity.co


1 Like

@touchaponk this did the trick, thanks!