When querying our endpoints you might encounter an error stating that you aren't allowed to query the specific endpoint. Below you can find the different error messages, each explained in depth, with ways to resolve it the issue.
If this information is not enough to get you back on track, feel free to always just reach out to our support. Someone from our team will get you back flying in no time.
Invalid Token (missing header)
{
"error": "Invalid auth-token",
"message": "Please provide a valid authentication header. See https://portal.electricitymaps.com/docs/getting-started#authorization for details"
}
β How to resolve:
Add an auth-key header or use Basic authorization.
See more details on the API documentation section about Authentication.
Invalid Token (non-existing token)
{
"error": "Invalid auth-token",
"message": "The provided token is invalid. If this token used to work, please visit https://help.electricitymaps.com to get support"
}
β How to resolve:
Please verify that the token was copied/typed correctly. If this is an old token, it might have been replaced during our recent migration to a new authentication system - see this guide on migration of duplicate API keys for the same user.