Yandex Cloud
  • Services
  • Solutions
  • Why Yandex Cloud
  • Blog
  • Pricing
  • Documentation
  • Contact us
Get started
Language / Region
Yandex project
© 2023 Intertech Services AG
Yandex Identity and Access Management
  • Getting started
  • Step-by-step guides
  • Concepts
  • How to use Yandex Cloud securely
  • Access management
  • Pricing policy
  • API reference
    • Authentication in the API
    • gRPC
    • REST
      • Overview
      • ApiKey
      • IamToken
        • Overview
        • create
        • createForServiceAccount
      • Key
      • Role
      • ServiceAccount
      • UserAccount
      • YandexPassportUserAccount
      • Operation
      • Federation
      • Certificate
      • AccessKey
  • Questions and answers
  1. API reference
  2. REST
  3. IamToken
  4. createForServiceAccount

Identity and Access Management API, REST: IamToken.createForServiceAccount

Written by
Yandex Cloud
  • HTTP request
  • Body parameters
  • Response

Create iam token for service account.

HTTP request

POST https://iam.api.cloud.yandex.net/iam/v1/tokens:createForServiceAccount

Body parameters

{
  "serviceAccountId": "string"
}
Field Description
serviceAccountId string

Required. The maximum string length in characters is 50.

Response

HTTP Code: 200 - OK

{
  "iamToken": "string",
  "expiresAt": "string"
}
Field Description
iamToken string

IAM token for the specified identity.

You should pass the token in the Authorization header for any further API requests. For example, Authorization: Bearer [iam_token].

expiresAt string (date-time)

IAM token expiration time.

String in RFC3339 text format. The range of possible values is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z, i.e. from 0 to 9 digits for fractions of a second.

To work with values in this field, use the APIs described in the Protocol Buffers reference. In some languages, built-in datetime utilities do not support nanosecond precision (9 digits).

Was the article helpful?

Language / Region
Yandex project
© 2023 Intertech Services AG
In this article:
  • HTTP request
  • Body parameters
  • Response