Exchange Token
organizations.exchange_token(strorganization_id, OrganizationExchangeTokenParams**kwargs) -> TokenResponse
POST/organizations/{organization_id}/token
Exchange user token for organization-scoped M2M token
Parameters
organization_id: str
Organization ID or label identifier
minLength1
maxLength255
x_client_request_id: Optional[str]
formatuuid
Returns
Exchange Token
from keycardai_api import KeycardAPI
client = KeycardAPI()
token_response = client.organizations.exchange_token(
organization_id="x",
)
print(token_response.access_token){
"access_token": "access_token",
"token_type": "Bearer",
"expires_in": 3600
}Returns Examples
{
"access_token": "access_token",
"token_type": "Bearer",
"expires_in": 3600
}