Session Management
Get Auth Token
Learn how to retrieve the authorization token using the Okto SDK.
The getAuthorizationToken()
method retrieves the current user's authorization token for authenticated operations.
Method Overview
Methods | Description |
---|---|
async OktoClient.getAuthorizationToken | Get the current authorization token |
Get Authorization Token
async OktoClient.getAuthorizationToken()
retrieves the current authorization token for the authenticated user.
Parameters
This method doesn't take any parameters.
Response
Success Response
Field Name | Type | Description |
---|---|---|
result | Promise<string> | Returns the authorization token |
The authorization token is a JWT that can be used to authenticate requests to Okto services. This token is automatically managed by the SDK for internal operations.
Note
In case of errors, debug the error using the error code and refer to the SDK errors and warnings documentation for more details.