Skip to main content
All CollectionsMiscellaneousAPI
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 yesterday

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"

πŸ“Œ Important to note

In upgraded Planhat (ws.planhat.com), "Service Accounts" (where you can generate API tokens) have been renamed "Private Apps", and they are now located within the "App Center".

Did this answer your question?