LinkedIn
Copied!

Table of Contents

Pega Customer Service chat security configuration API

Version:

Only available versions of this content are shown in the dropdown

Pega Customer Service chat security configuration API to access and modify chat parameters in Pega Cloud, including the rate of new messages, the connection requests, and the allowed domains in the Pega Customer Service chat server.

The security configuration API includes the following methods:

Get configuration
Pulls the security configuration of your Pega Customer Service chat instance from the database.
Post configuration
Updates the security configuration of your Pega Customer Service chat in the database.

Authentication

Both Get and Post configuration uses the request header parameter for authentication. The Pega Customer Service chat company identifier is included in the company provision mail in the following format:authorization: privateAPIKey FPK4mmKXmwtKFyzNe4aN0XU

Authentication error codes

Error code Description
401 Authorization missing
402 Authorization is invalid

Get configuration method

Use the Get configurationfunction to pull the security configuration for your organization from the chat database.

Endpoint

GET/{{chatserverURL}}/chat/api/securityConfiguration

Response parameters

Parameter Required Description
Websocket Ratelimit Optional The number of WebSocket connections that can be established for an IP address in one second.
Message Ratelimit Optional The number of WebSocket messages that can be transferred in the socket in one second.
Allowed origins Optional Domains from which chat servers permit chat requests, separated by commas. The parameter does not support the asterisk (*).

Example response

{ "company":{ "Websocket Ratelimit":2, "Message Ratelimit":6, "Allowed origins":[ "http://expressjs.com", "http://www.sustainablesites.com" ] } }

Post configuration function

Use the Post configuration function to update the security configuration for your company in the chat database.

Endpoint

POST/{{chatserverURL}}/chat/api/securityConfigurationUpdate

Headers

Content-Type: application/JSON

Request parameters

Parameter Required Description
websocketRatelimit Optional The number of WebSocket connections that can be established for an IP address in one second. The minimum value for websocketRateLimit is one, and the maximum is five.
messageRatelimit Optional The number of WebSocket messages that can be transferred with in the socket in one second. The minimum value for messageRateLimit is three and the maximum is eight.
allowedOrigins Optional Domains from which chat servers permit chat requests, separated by commas. The parameter does not support the asterisk (*).

Example request

{ "websocketRateLimit":5, "messageRatelimit":7, "allowedOrigins":[ "http://expressjs.com", "http://www.sustainablesites.com" }

Successful Response

Company data has been updated.

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.