How can i generate a access_token using api_key

I am trying to access ‘https://zenhub.ibm.com/api/v1/graphql’ url by using api_key generating from account management.
With this api_key also i am getting api key ‘401 error with “message”:“missing authentication token in headers”’.
So how can i generate the access_token to pass in the header ?.

I got back to trying to using API today, and I keep getting 401 with a newly generated token.

It is very strange that no one is responding to many questions asked on this forum. I understand when open source projects do not have the capacity to respond, but Zenhub is not a free open source project. Very strange…

Hey @fedorov

Can you share some details around the request you are trying to make and your request body?

You can also take a look at our getting started guide which has a few example requests to try out.

1 Like

@Joseph.from.Zenhub thanks for responding!

I am following the documentation, and specifically the link to the Explorer: Explorer | Zenhub Developers. I generated the token as described in the documentation.

When I enter that token in the Explorer page and run the auto-generated example, I am getting this:

Also, the link https://developers.zenhub.com/explorer/graphql-api-docs/getting-started#authentication from the Explorer page is broken.

Do you mind double checking that you have correctly copied your token, and the query you are trying to run? Please also be sure to replace the “WORKSPACE_NAME” with the workspace you are looking for.

I was able to get the same query working using the explorer.

1 Like

@Joseph.from.Zenhub thank you for your help!

As it turns out, I was using incorrect token. Instead of generating the API key in the " GraphQL Personal API Key" section, I created one using " REST API Token" section. This problem is resolved, I appreciate the quick response!

1 Like