Skip to content

Latest commit

 

History

History
51 lines (31 loc) · 1.9 KB

File metadata and controls

51 lines (31 loc) · 1.9 KB

Client.Authentication

Overview

Available Operations

create_token

Creates an authentication token for the authenticated user. These are specifically intended to be used with the Web SDK.

Note: The tokens generated from this endpoint are not valid tokens for use with the Client API (e.g. /rest/api/v1/*).

Example Usage

from glean.api_client import Glean
import os


with Glean(
    api_token=os.getenv("GLEAN_API_TOKEN", ""),
) as glean:

    res = glean.client.authentication.create_token()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.CreateAuthTokenResponse

Errors

Error Type Status Code Content Type
errors.GleanError 4XX, 5XX */*