Authentication in DataSphere Jobs
To use DataSphere Jobs, you need to get authenticated as a user account.
-
Get an OAuth token.
-
Provide the OAuth token in one of the following ways:
-
Using the
YC_TOKENorYC_OAUTH_TOKENenvironment variables in the~/.bash_profileconfiguration file (~/.bashrcfor Linux).The OAuth token will be saved in the profile configuration, enabling automatic authentication.
-
Using DataSphere CLI and the
-toption. Here is an example:datasphere -t <OAuth_token> project job get --id <project_ID>To copy the project ID, select the project on the DataSphere homepage
and click ID .In this case, you will have to provide the OAuth token in each command.
-
To authenticate federated accounts, install and configure the Yandex CLI. You cannot run a job as a federated account on a local computer without a graphical shell: the Yandex CLI will redirect your request to the browser for authentication.