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/v1/{name=users/*/environments/*}:authorize
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
name
|
Name of the resource that should receive the credentials, for example |
Request body
The request body contains data with the following structure:
| JSON representation |
|---|
{ "accessToken" : string , "idToken" : string , "expireTime" : string } |
| Fields | |
|---|---|
accessToken
|
The OAuth access token that should be sent to the environment. |
idToken
|
The OAuth ID token that should be sent to the environment. |
expireTime
|
The time when the credentials expire. If not set, defaults to one hour from when the server received the request. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
Response body
If successful, the response body contains an instance of Operation
.
Authorization scopes
Requires the following OAuth scope:
-
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview .

