Method: users.environments.authorize

Sends OAuth credentials to a running environment on behalf of a user. When this completes, the environment will be authorized to run various Google Cloud command line tools without requiring the user to manually authenticate.

HTTP request

POST https://cloudshell.googleapis.com/v1alpha1/{name=users/*/environments/*}:authorize

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

Name of the resource that should receive the credentials, for example users/me/environments/default or users/someone@example.com/environments/default.

Request body

The request body contains data with the following structure:

JSON representation
{
  "accessToken": string,
  "idToken": string,
  "expireTime": string
}
Fields
accessToken

string

The OAuth access token that should be sent to the environment.

idToken

string

The OAuth ID token that should be sent to the environment.

expireTime

string (Timestamp format)

The time when the credentials expire. If not set, defaults to one hour from when the server received the request.

A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z".

Response body

If successful, the response body will be empty.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

Try it!

Kunde den här sidan hjälpa dig? Berätta:

Skicka feedback om ...