Credentials helpers
These helpers let you inspect and manage the active credentials profile used by the SDK.
Get current profile
get_current_profile()
Get the name of the current credentials profile.
Returns:
| Type | Description |
|---|---|
str
|
Name of the current credentials profile. |
Set current profile
set_current_profile(profile)
Set the current credentials profile.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
profile
|
str
|
Name of the credentials profile to set. |
required |
Get credentials and config
get_credentials_and_config()
Get current client credentials and configuration.
Returns:
| Type | Description |
|---|---|
dict
|
Current client credentials and configuration details. |
Refresh token
Use this only if your profile uses OAuth2 credentials and you need a manual refresh.
refresh_token()
Refresh the current OAuth2 access token.
Uses the refresh token stored in client configuration to obtain a new access token. Requires OAuth2 authentication configuration.