Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LC-132 add remote logout #1442

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/pages/messaging/agent-chat-api/changelog/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ The developer preview version provides a preview of the upcoming changes to the

- The **List Customers** method was removed.

### Status

- The **Logout** ([RTM](/messaging/agent-chat-api/v3.6/rtm-reference/#logout)) method has a new optional `agent_id` field which enables remote logout.
- There is a new **Logout** ([Web](/messaging/agent-chat-api/v3.6/#logout)) method.

## [v3.5] - 2022-11-23

### Chats
Expand Down
44 changes: 44 additions & 0 deletions src/pages/messaging/agent-chat-api/v3.6/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2317,6 +2317,50 @@ https://api.livechatinc.com/v3.6/agent/action/list_routing_statuses \
</Code>
</Section>

<Section>
<Text>

### Logout

It logs out the specified agent.

#### Specifics

| | |
| ---------------------- | ---------------------------------------------------------------- |
| **Method URL** | `https://api.livechatinc.com/v3.6/agent/action/logout` |
| **Required scopes** | `agents--all:rw` |
| **RTM API equivalent** | [`logout`](/messaging/agent-chat-api/v3.6/rtm-reference/#logout) |
| **Push message** | - |

#### Request

| Parameter | Required | Data type | Notes |
| ---------- | -------- | --------- | ----- |
| `agent_id` | Yes | `string` | - |

#### Response

No response payload (`200 OK`).

</Text>
<Code>
<CodeSample path={'REQUEST'}>

```shell
curl -X POST \
https://api.livechatinc.com/v3.6/agent/action/logout \
-H 'Authorization: Bearer <your_access_token>' \
-H 'Content-Type: application/json' \
-d '{
"agent_id": "agent@example.com"
}'
```

</CodeSample>
</Code>
</Section>

## Other

<Section>
Expand Down
22 changes: 15 additions & 7 deletions src/pages/messaging/agent-chat-api/v3.6/rtm-reference/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2715,12 +2715,18 @@ Logs the Agent out.

#### Specifics

| | |
| ---------------------- | -------- |
| **Action** | `logout` |
| **Required scopes** | - |
| **Web API equivalent** | - |
| **Push message** | - |
| | |
| ---------------------- | ------------------------------------------------- |
| **Action** | `logout` |
| **Required scopes** | Only if agent_id is specified: `agents--all:rw` |
| **Web API equivalent** | [`logout`](/messaging/agent-chat-api/v3.6/#logout)|
| **Push message** | - |

#### Request

| Parameter | Required | Data type | Notes |
| ---------- | -------- | --------- | --------------------------------------------------- |
| `agent_id` | No | `string` | If not specified, the requester will be logged out. |

</Text>
<Code>
Expand All @@ -2729,7 +2735,9 @@ Logs the Agent out.
```json
{
"action": "logout",
"payload": {}
"payload": {
"agent_id": "smith@example.com"
}
}
```

Expand Down