Invalid authentication token in headers error
When using the Zenhub API, you can generate a token through the Zenhub dashboard. But if you're running scripts through the console or are on legacy version of Zenhub Enterprise and using the console to generate a token, you may encounter the following error: Invalid token” curl -H 'x-authentication-token or invalid authentication token in headers.
When seeing this error generating tokens in the console, or otherwise running scripts, this is typically because of two reasons:
- You're not logged into the GitHub account that matches your Zenhub account, nor are you logged into Zenhub
- You're not executing the script within GitHub
To execute scripts or generate tokens using the Zenhub API, you'll need to be logged in to both GitHub and Zenhub and be within your GitHub domain to execute them. At the moment, executing scripts when on the web app does not work.
Downloading the Zenhub extension to work within GitHub
If you're using cloud and need to download the extension to log in to ZenHub while within GitHub, you can download it here. For Enterprise teams, you'll need to navigate back to your team's main domain where you first got started to re-access the extension.