set_auth_token | Set Authentication Token | Open Analytics Framework - set_auth_token - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
Language
English (United States)
Last Update
2024-04-03
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

Use the set_auth_token function to set the Authentication token to connect to User Environment Service (UES) in VantageCloud Lake.

User must have the privilege to log on with a NULL password to use set_auth_token().
set_auth_token() opens a session in your default browser for authentication.
set_auth_token() also publishes a URL while running. If you are not able to access the session initiated by this API, you can manually copy the URL and paste it in any browser for authentication.

Required Argument

ues_url
Specifies the URL for User Environment Service in VantageCloud Lake.
It is the Open Analytics Endpoint URL displayed in VantageCloud Lake Console on the Overview tab.

Optional Argument

client_id
Specifies the id of the application that requests the access token from VantageCloud Lake.
Typically, it has the format client_id = <org_name>-oaf-device. You can get the organization name from the URL used to access the VantageCloud Lake Console. For example, https://organization_name.innovationlabs.teradata.com.

This function returns True if the operation is successful.

Example 1: Set the Authentication token using default client_id

>>> import getpass
>>> set_auth_token(ues_url=getpass.getpass("ues_url : "))

Example 2: Set the Authentication token by specifying the client_id

>>> import getpass
>>> set_auth_token(ues_url=getpass.getpass("ues_url : "),
                    client_id=getpass.getpass("client_id : "))