ShivLing | 2024-05-21 16:57:21 UTC | #1
Hi All,
I need to create an integration and action to call a client application API end point to send the call logs from Genesys cloud. I have created web service data actions integration and actions, when testing the data action I get Action successfully run, with response empty.
I have the below details and steps to access their API's
Username, Password, Secret key, IV
- Convert Secret key to AES 256 HEX key
- Using the AES 256 HEX Key, IV, username and password value, encrypt it
- In postman enter the above encrypted string in body raw data
- Generate Nonce value and add Nonce Header with the value, send the request post method to https://abc.com/restapi/oauth2/token
- Received output is an encrypted value, decrypt this encrypted value to see the token.
- In Postman select the bearer token authtype, enter the token from above step.
- Encrypt the Request body and enter the encrypted value in the body of postman
- Generate Nonce value and add Nonce header with the value and send the request post method to https://abc.com/xxx/Object
- Response body will be an encrypted value, again decrypt to see the decrypted response
I think the integration and actions created is not proper, so we get a blank response. Can you please guide me what credential type I need to use while creating the integration for the above case and also I have pasted my data action for the same and how do I manage the encryption, decryption and Nonce header in this case?
{ "name": "Dev Client - Exported 2024-05-21 @ 21:39", "integrationType": "custom-rest-actions", "actionType": "custom", "config": { "request": { "requestUrlTemplate": "https://abc.com/xxx/Object", "requestType": "POST", "headers": { "Nonce": "Basic $encoding.base64(\"${credentials.username}:${credentials.password}\")" }, "requestTemplate": "${input.rawRequest}" }, "response": { "translationMap": {}, "translationMapDefaults": {}, "successTemplate": "${rawResult}" } }, "contract": { "input": { "inputSchema": { "title": "Input", "type": "object", "properties": { "CallStartTime": { "type": "string" }, "CallEndTime": { "type": "string" }, "SourcePhone": { "type": "string" }, "DestinationPhone": { "type": "string" } }, "additionalProperties": true } }, "output": { "successSchema": { "type": "object", "properties": { "ActivityId": { "type": "string" } }, "additionalProperties": true } } }, "secure": false }
Jason_Mathison | 2024-05-21 20:24:42 UTC | #2
Hi ShivLing,
The authentication requirements for that endpoint appear to be beyond what we provide built-in support for in Data Actions. I would suggest having your data action connect to an AWS Lambda, Google Function, or possibly our Functions beta: https://community.genesys.com/discussion/upcoming-beta-genesys-cloud-functions
--Jason
system | 2024-06-21 20:24:50 UTC | #3
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 26380