Skip to content

Update Authentication

Request

Overview

Use this API to update an existing authentication type.

Scope

Client application must have 'app.conversation.conversationmgr.manage' scope assigned.

Security
oAuthClient(Required scopes:
https://api.egain.cloud/auth/.de...
)
Path
idstring, = 36 charactersrequired

id of object

Example:7b6c5fff-036e-4a40-b68a-a67c592fc079
Bodyapplication/json

Update authentication type

One of:

OAuth type authentication for callback APIs specified in Client application. Conversation Hub will generate token using this API and use it until it receives 401 from callback API

modifiedstring, (date-time)

Last modified time in GMT

namestring, [ 1 .. 255 ] charactersrequired

Unique name for authentication method

descriptionstring, [ 1 .. 1023 ] characters
activeboolean
Default:true
typestringrequired

Type of authentication

Value:"oauth2"
Example:"oauth2"
oauth2objectrequired
curl -i -X PUT \
  https://api.egain.cloud/conversation/conversationmgr/v3/authentications/7b6c5fff-036e-4a40-b68a-a67c592fc079 \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "custom_bot_callback_authentication",
    "type": "oauth2",
    "oauth2": {
      "tokenRequestUrl": "https://acme.support.com/clientapp/accesstoken",
      "method": "POST",
      "headers": [
        {
          "name": "Content-Type",
          "value": "application/json"
        },
        {
          "name": "Accept",
          "value": "application/json"
        }
      ],
      "payload": "{ \"clientId\": \"c987cbfc-d59c-11ea-87d0-0242ac130003\",\"clientSecret\": \"c987cde6-d59c-11ea-87d0-0242ac130003\",\"refreshToken\": \"c987cee0-d59c-11ea-87d0-0242ac130003\"}",
      "accessTokenPath": "$.accessToken"
    },
    "modified": "2021-03-28T14:29:01.516Z"
  }'

Responses

No Content

Response
No content