Create an API token using an API request #3292
-
Hi, I've seen here that we need to access Unleash UI to create the API token. Is it the only way? It would be great if we could get it from an API request so that we can start our development environment easily. For instance:
Best regards, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hey! Yeah, you can use the API tokens API. The create API token operation should do that for you. However, you will need an API token to use the API in the first place, so it might be that you're better off starting Unleash with API tokens already present. You can do that using the Let me know if that gives you what you need |
Beta Was this translation helpful? Give feedback.
-
Hi @thomasheartman Thanks for the fast response 😄 Let me show I am trying
Checking Unleash logs, I am getting an ERROR, "Unable to create initial Admin API tokens"
Am I missing or doing something wrong? Thanks! |
Beta Was this translation helpful? Give feedback.
Hey!
Yeah, you can use the API tokens API. The create API token operation should do that for you.
However, you will need an API token to use the API in the first place, so it might be that you're better off starting Unleash with API tokens already present. You can do that using the
INIT_ADMIN_API_TOKENS
/INIT_CLIENT_API_TOKENS
environment variables as mentioned in the further customization section of the Configuring Unleash document .Let me know if that gives you what you need☺️