GetHostAuthenticationToken
client.runners.configurations.hostAuthenticationTokens.retrieve(HostAuthenticationTokenRetrieveParams { id } body, RequestOptionsoptions?): HostAuthenticationTokenRetrieveResponse { token }
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 Gitpod from '@gitpod/sdk';
const client = new Gitpod({
bearerToken: process.env['GITPOD_API_KEY'], // This is the default and can be omitted
});
const hostAuthenticationToken =
await client.runners.configurations.hostAuthenticationTokens.retrieve({
id: 'd2c94c27-3b76-4a42-b88c-95a85e392c68',
});
console.log(hostAuthenticationToken.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"
}
}