[Yandex Cloud documentation](../../../index.md) > [Yandex Identity and Access Management](../../index.md) > [Concepts](../index.md) > [Authentication](index.md) > OAuth token

# OAuth token


{% note warning "OAuth token authentication is no longer supported" %}

Starting June 1, 2026, the authentication service no longer accepts **new** OAuth tokens received via YandexID. Tokens **issued before June 1, 2026** will remain valid until their expiration date.

{% endnote %}

In Yandex Cloud, an OAuth token is used to authenticate users with a Yandex account: the user exchanges an OAuth token for an [IAM token](iam-token.md).

You can get an OAuth token for Yandex Cloud by submitting a [request](https://oauth.yandex.com/authorize?response_type=token&client_id=1a6990aa636648e9b2ef855fa7bec2fb) to Yandex OAuth.

OAuth tokens are not available for federated users and service accounts.

## OAuth token format {#oauth-token-format}

The token always starts with a `y`, a random number in the `0-3` range, and an underscore (`_`). Other characters may include:

* Latin letters.
* Numbers.
* Underscores (`_`) and hyphens (`-`).

For example, an OAuth token may look like this: `y3_Vdheub7w9bIut67GHeL345gfb5GAnd3dZnf08FRbvjeUFvetYiohGvc`.

## Lifetime {#lifetime}

An OAuth token lives 12 months. After that, you need to [get a new one](https://oauth.yandex.com/authorize?response_type=token&client_id=1a6990aa636648e9b2ef855fa7bec2fb) and get authenticated again.

{% note alert %}

If someone could have learned your OAuth token, revoke it and get a new one by following the [instructions](../../operations/compromised-credentials.md#oauth-reissue).

{% endnote %}

## Services and utilities that support OAuth token authentication {#supported-services}

These services and utilities can request an IAM token automatically, so you can only specify an OAuth token for authentication:
* [Yandex Cloud CLI](../../../cli/quickstart.md#initialize)
* [Yandex Container Registry](../../../container-registry/operations/authentication.md#user)
* [Terraform](../../../tutorials/infrastructure-management/terraform-quickstart.md)
* [Packer](../../../tutorials/infrastructure-management/packer-quickstart.md)
* [GitLab CI](../../../tutorials/testing/ci-for-snapshots.md)

## Use cases {#examples}

* [Running a Docker image on a VM](../../../tutorials/infrastructure-management/run-docker-on-vm/index.md)
* [Developing CRUD APIs for a movie service](../../../serverless-containers/tutorials/movies-database.md)

#### Useful links {#see-also}

* Learn more about Yandex OAuth [here](https://yandex.com/dev/id/doc/dg/oauth/concepts/about.html).