RegenerateSCIMToken
client.organizations.scimConfigurations.regenerateToken(ScimConfigurationRegenerateTokenParams { scimConfigurationId, tokenExpiresIn } body, RequestOptionsoptions?): ScimConfigurationRegenerateTokenResponse { token, tokenExpiresAt }
POST/gitpod.v1.OrganizationService/RegenerateSCIMToken
Regenerates the bearer token for a SCIM configuration.
Use this method to:
- Rotate SCIM credentials
- Recover from token compromise
- Update IdP configuration
Examples
-
Regenerate token:
Creates a new bearer token with the same expiration duration as the previous token.
scimConfigurationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" -
Regenerate token with new expiration:
Creates a new bearer token with a custom 180-day expiration.
scimConfigurationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" tokenExpiresIn: "15552000s"
RegenerateSCIMToken
import Gitpod from '@gitpod/sdk';
const client = new Gitpod({
bearerToken: process.env['GITPOD_API_KEY'], // This is the default and can be omitted
});
const response = await client.organizations.scimConfigurations.regenerateToken({
scimConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68',
});
console.log(response.token);{
"token": "token",
"tokenExpiresAt": "2019-12-27T18:11:19.117Z"
}Returns Examples
{
"token": "token",
"tokenExpiresAt": "2019-12-27T18:11:19.117Z"
}