GetHostAuthenticationToken
runners.configurations.host_authentication_tokens.retrieve(HostAuthenticationTokenRetrieveParams**kwargs) -> HostAuthenticationTokenRetrieveResponse
POST/gitpod.v1.RunnerConfigurationService/GetHostAuthenticationToken
Gets details about a specific host authentication token.
Use this method to:
- View token information
- Check token expiration
- Verify token validity
Examples
-
Get token details:
Retrieves information about a specific token.
id: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
GetHostAuthenticationToken
import os
from gitpod import Gitpod
client = Gitpod(
bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted
)
host_authentication_token = client.runners.configurations.host_authentication_tokens.retrieve(
id="d2c94c27-3b76-4a42-b88c-95a85e392c68",
)
print(host_authentication_token.token){
"token": {
"id": "id",
"expiresAt": "2019-12-27T18:11:19.117Z",
"host": "host",
"integrationId": "integrationId",
"runnerId": "runnerId",
"scopes": [
"string"
],
"source": "HOST_AUTHENTICATION_TOKEN_SOURCE_UNSPECIFIED",
"subject": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"principal": "PRINCIPAL_UNSPECIFIED"
},
"userId": "userId"
}
}Returns Examples
{
"token": {
"id": "id",
"expiresAt": "2019-12-27T18:11:19.117Z",
"host": "host",
"integrationId": "integrationId",
"runnerId": "runnerId",
"scopes": [
"string"
],
"source": "HOST_AUTHENTICATION_TOKEN_SOURCE_UNSPECIFIED",
"subject": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"principal": "PRINCIPAL_UNSPECIFIED"
},
"userId": "userId"
}
}