Search code examples
directus

Unable to access user token in Directus


I am trying to get directus user token. For this purpose I am using Postman. But when I send a POST request to the api with user login credentials. I get this error:

We're sorry but Directus doesn't work without JavaScript enabled. Please enable it to continue.

I want to access the (user token). Is there any alternative way to get user token in Directus CMS. Any help will be appreciated.

Thank you.


Solution

  • You could try the static token. It is generated for each user on directus_users.token. It's a little less-secure (depending on how you're using it) since it doesn't change, but should be much easier:

    https://docs.directus.io/api/reference.html#static-tokens