Original Message:
Sent: 12-19-2019 10:44
From: Andrei Marginean
Subject: Set Integration Credentials via API
Hi Becky,
The version is not the issue. even sending it as integer (without quotes) is not helping. same result.
{
"name": "LumenVox Voice Biometrics--Integration",
"version": 2,
"properties": {
"url": "https://www.lumenvox.com",
"sandbox": "allow-forms,allow-modals,allow-popups,allow-presentation,allow-same-origin,allow-scripts",
"displayType": "standalone",
"featureCategory": "",
"groupFilter": [
"a290397d-d635-49a5-91f5-1c084086f5d3",
"e1a8c8a6-a349-4b33-b03d-6f586e7eb5ca"
]
},
"advanced": {},
"notes": "Web API Credentials",
"credentials": {
"id": "e3ee278d-0ce1-4c57-b606-183b8501ecdf",
"name": "Integration-69203e0e-9867-4cad-abca-68f7a67bc5c2",
"createdDate": "2019-12-19T15:16:44Z",
"modifiedDate": "2019-12-19T15:16:44Z",
"type": {
"name": "basicAuth"
},
"selfUri": "/api/v2/integrations/credentials/e3ee278d-0ce1-4c57-b606-183b8501ecdf"
}
}
{
"status": 400,
"code": "bad.request",
"message": "The request could not be understood by the server due to malformed syntax.",
"contextId": "7512afa6-a7cc-4a92-9f1f-e757cd6557ee",
"details": [],
"errors": []
}
I will check the Developer Forum too.
Thanks for the tips!
Andrei
------------------------------
Andrei
LumenVox
Original Message:
Sent: 12-19-2019 09:28
From: Becky Powell
Subject: Set Integration Credentials via API
Andrei, have you tried testing this call in our Developer Tools?
I don't believe you need to include quotation marks around the version number.
We welcome you to visit us in the Developer Forum to receive expert answers to questions around our APIs.
Cheers!
-Becky
------------------------------
Becky Powell
Principal Product Manager, PureCloud Open Platform
Genesys - Employees
Original Message:
Sent: 12-18-2019 09:17
From: Andrei Marginean
Subject: Set Integration Credentials via API
Hi Melissa,
thanks for your answer. probably the triple quotes are just a typo posting the question.
Here once more one fresh request, with the same result:PUT /api/v2/integrations/51039a36-3e3f-417d-9d7d-f7c63aa7a436/config/current HTTP/1.1
Host: api.mypurecloud.com
Content-Type: application/json
Authorization: Bearer ixYaDt8NLmCGF6QKTXvNpOsVZFcdfoHeFIVLT0kUN3nYHRVnZcXI4dnEGUVUNvBPutNiSgMGc8UzfMyw-DxsAA
User-Agent: PostmanRuntime/7.20.1
Accept: */*
Cache-Control: no-cache
Postman-Token: 061fc19f-f37c-4676-a8b3-de36e104dab4,eba23571-a017-4d1a-9fe9-b45b6ac3dfa9
Host: api.mypurecloud.com
Accept-Encoding: gzip, deflate
Content-Length: 898
Connection: keep-alive
cache-control: no-cache
{
"name": "LumenVox Integration",
"version": "1",
"properties": {
"url": "https://www.lumenvox.com",
"sandbox": "allow-forms,allow-modals,allow-popups,allow-presentation,allow-same-origin,allow-scripts",
"displayType": "standalone",
"featureCategory": "",
"groupFilter": [
"6126e9e1-9608-4956-882b-a68e950776fa",
"83f2ebc3-4222-42d4-a8ae-ce70cdfa3392"
]
},
"advanced": {},
"notes": "Web API Credentials",
"credentials": {
"id": "799a95ff-8f4b-46a2-9141-079c15d3a80d",
"name": "Integration-51039a36-3e3f-417d-9d7d-f7c63aa7a436",
"createdDate": "2019-12-18T14:09:07Z",
"modifiedDate": "2019-12-18T14:09:07Z",
"type": {
"name": "basicAuth"
},
"selfUri": "/api/v2/integrations/credentials/799a95ff-8f4b-46a2-9141-079c15d3a80d"
}
}
Response:{
"status": 400,
"code": "bad.request",
"message": "The request could not be understood by the server due to malformed syntax.",
"contextId": "e775dbbc-51b4-4d83-abf5-b04e4e8e4904",
"details": [],
"errors": []
}
------------------------------
Andrei
LumenVox
Original Message:
Sent: 12-18-2019 08:52
From: Melissa Bailey
Subject: Set Integration Credentials via API
Your PUT body is not valid json. You have this, notice the 3 quote marks (there should only be 2).
"notes": """,
------------------------------
Melissa Bailey
Genesys - Employees
Original Message:
Sent: 12-18-2019 03:52
From: Andrei Marginean
Subject: Set Integration Credentials via API
Hello everyone,
On a Custom WebService DataAction Integration created via API ( based on the wizzard-app sample) we need to set the web service credentials.
in the first step the credentials (basicAuth type) are created using postIntegrationsCredentials:
let credentials = {
"body": {
"name": "Integration-2cefbe68-cdd8-4f21-89ab-6f3036bafd3d",
"type": {
"name": "basicAuth",
"properties": {
"password": {
"type": "string",
"title": "Password",
"description": "The password used for authentication.",
"sensitive": true,
"confirm": true
},
"userName": {
"type": "string",
"title": "Username",
"description": "The username used for authentication."
}
},
"displayOrder": [
"userName",
"password"],
"required": [
"userName"]
},
"credentialFields": {
"password": "p@ssword",
"userName": "loginname"
}
}
}
postIntegrationsCredentials(credentials)
Response (CredentialInfo):
{
"id": "97f652b5-eb50-4989-9d99-9ed9d6cd5fed",
"name": "Integration-00000000-0000-0000-0000-000000000000",
"createdDate": "2019-12-17T16:16:21Z",
"modifiedDate": "2019-12-17T16:16:21Z",
"type": {
"name": "basicAuth"
},
"selfUri": "/api/v2/integrations/credentials/97f652b5-eb50-4989-9d99-9ed9d6cd5fed"
}
return value (CredentialInfo) is used then via putIntegrationConfigCurrent to update the integration.
PUT /api/v2/integrations/00000000-0000-0000-0000-000000000000/config/current HTTP/1.1
Host: api.mypurecloud.com
Content-Type: application/json
Authorization: Bearer luaDd8uS2McYHoJaxOoVFxGKoKosIFnVtn4Izt3t8txKKWgjAhWaKH1YT-Aonuj78sQJHAYGQkw6Ew--c86Ymw
User-Agent: PostmanRuntime/7.20.1
Accept: */*
Cache-Control: no-cache
Postman-Token: abe7b860-472e-4727-bea3-1b75a0c81268,b30ecb0c-45cd-4050-ac27-7cbb5757854b
Host: api.mypurecloud.com
Accept-Encoding: gzip, deflate
Content-Length: 901
Connection: keep-alive
cache-control: no-cache
{
"name": "TEST Integration with Credentials",
"version": "3",
"properties": {
"url": "https://www.test-credentials.com",
"sandbox": "allow-forms,allow-modals,allow-popups,allow-presentation,allow-same-origin,allow-scripts",
"displayType": "standalone",
"featureCategory": "",
"groupFilter": [
"1301c6da-779b-4487-843d-04572bba22d8",
"b70424e5-c699-4ccf-bb7a-48cab94fc738"
]
},
"advanced": {},
"notes": """,
"credentials": {
"id": "97f652b5-eb50-4989-9d99-9ed9d6cd5fed",
"name": "Integration-00000000-0000-0000-0000-000000000000",
"createdDate": "2019-12-17T16:16:21Z",
"modifiedDate": "2019-12-17T16:16:21Z",
"type": {
"name": "basicAuth"
},
"selfUri": "/api/v2/integrations/credentials/97f652b5-eb50-4989-9d99-9ed9d6cd5fed"
}
}
the response we get back is:
{
"status": 400,
"code": "bad.request",
"message": "The request could not be understood by the server due to malformed syntax.",
"contextId": "2c2f0b34-3e70-4ca0-86a7-3b8f3f2e858c",
"details": [],
"errors": []
}
Whats the right request format for credentials configuration ?
Note : If credentials filed is left empty the the request is successful.
Many Thanks!
Andrei
#Integrations
------------------------------
LumenVox
------------------------------