Marks user as ACTIVE in Google Chat.
Sets the user's availability state to ACTIVE. The ACTIVE state lasts until the specified expiration, at which point the user's state becomes AWAY. Note that if the user is actively using Chat, the ACTIVE state duration may extend beyond the provided expiration.
This method only updates the authenticated user's availability.
Requires user authentication with authorization scope:
https://www.googleapis.com/auth/chat.users.availability
HTTP request
POST https://chat.googleapis.com/v1/{name=users/*/availability}:markAsActive
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
name |
Required. The resource name of the availability to mark as active. Format: users/{user}/availability
The user's email address or |
Request body
The request body contains data with the following structure:
| JSON representation |
|---|
{ "expireTime": string, "ttl": string } |
| Fields | |
|---|---|
Union field expiration. The expiration for the ACTIVE availability state. The user will be marked as Away after expiration. If no expiration is provided, the ACTIVE state will expire 30 minutes from the current time. expiration can be only one of the following: |
|
expireTime |
The absolute timestamp when the ACTIVE state expires. |
ttl |
The duration from the current time until the ACTIVE state expires. Using a short TTL can effectively reset the user's state to be based on activity after this brief duration. |
Response body
If successful, the response body contains an instance of Availability.
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/chat.users.availability
For more information, see the Authorization guide.