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.