Skip to main content
All CollectionsTechnical cornerAPI
How can I generate a host password for an API request?
How can I generate a host password for an API request?

How to pass the authorization for API Personal Access Token

Christian Dreyer avatar
Written by Christian Dreyer
Updated over 6 years ago

Q: I am testing API requests to integrate information with Planhat. As I am attempting to do so, I receive the following message in response:

enter host password for user '[PERSONAL ACCESS_TOKEN]'. 

How can I get or generate the host password?

A: The token can be passed either using Authorization Bearer header or Authorization Basic.

Authorization: Bearer [PERSONAL_ACCESS_TOKEN]
[or]
Authorization: Basic [base64encode(PERSONAL_ACCESS_TOKEN:)]

In the last case, "TOKEN" is still enough to access the API, but since by convention a password is also needed you have to add a colon ":" after the token. 

You can find further directions in our API documentation here:
https://docs.planhat.com/#authentication 

tags: "api access token", "api password", "host password"

Did this answer your question?