Personal API token check


#1

@romain.lanz

auth.authenticator('api').check();

I am passing Authorization header as well correctly.
InvalidApiToken: E_INVALID_API_TOKEN: The API token is missing or invalid


#2

Hey @nir-jas! :wave:

You must have done something wrong.

  1. What is the authentication scheme selected in your config
  2. How the route you are trying to access looks like
  3. How the header you are sending looks like

#3

Hey @romain.lanz,

I have solved it, I forgot to define primary and foreign key for relationship in Token Model. That’s why It was not able to find decrypted token in database.