pwalsh | 2025-01-21 17:15:16 UTC | #1
Hi there.
I'm trying to send an agentless WhatsApp message. I get the following error running my test code:
''No Response could be found with an id of .. whatever...'
-> now I have no reason to think I have the right ID here, yet.
Q1: *As far as I am aware this should be the Id of the WhatsApp template I want to use? -> am I even looking for the right thing here?
I query for response management libraries with getResponsemanagementLibraries
-> get a list of the libraries (there is just one).
Then I query for Response Management Responses with getResponsemanagementResponses with the library ID I got previously
-> this succeeds, but it appears to be empty?
getResponsemanagementLibraries success! data: { "entities": [ { "id": "the ID of the library", "name": "*it's name*", "version": 1, "createdBy": { "id": "me", "selfUri": "/api/v2/users/*me*" }, "dateCreated": "2025-01-21T14:16:32.146Z", "selfUri": "/api/v2/responsemanagement/libraries/*the ID again**" } ], "pageSize": 25, "pageNumber": 1, "total": 1, "lastUri": "/api/v2/responsemanagement/libraries?pageSize=25&pageNumber=1", "firstUri": "/api/v2/responsemanagement/libraries?pageSize=25&pageNumber=1", "selfUri": "/api/v2/responsemanagement/libraries?pageSize=25&pageNumber=1", "pageCount": 1 }
getResponsemanagementResponses success! data: { "entities": [], "pageSize": 25, "pageNumber": 1, "total": 0, "lastUri": "/api/v2/responsemanagement/responses?pageSize=25&pageNumber=1&libraryId=%5Bobject+Object%5D", "firstUri": "/api/v2/responsemanagement/responses?pageSize=25&pageNumber=1&libraryId=%5Bobject+Object%5D", "selfUri": "/api/v2/responsemanagement/responses?pageSize=25&pageNumber=1&libraryId=%5Bobject+Object%5D", "pageCount": 0 }
pwalsh | 2025-01-21 17:19:34 UTC | #2
This is the body of the request I am sending:
{ "fromAddress": "* UUID of WhatsApp Integration *", "toAddress": "* To number without + *", "toAddressMessengerType": "whatsapp", "messagingTemplate": { "bodyParameters": [ { "id": "1", "value": "Some text" }, { "id": "2", "value": "more text" }, { "id": "3", "value": "more text" }, { "id": "4", "value": "more text" } ], "responseId": "* currently using the library ID as I don't really know what to put here *" } };
pwalsh | 2025-01-21 17:36:17 UTC | #3
OK, I got the ID from postResponsemanagementResponsesQuery
--> And *appear to have sent the message successfully....:
There's quite a bit in the response I get - but it *looks 'queued'? (I'm not getting the message)
"status": "queued", "normalizedMessage": { "id": "94257cd5272fb8c1bf0f53ddf838b1c1", "channel": { "id": "ad498395-acba-4361-b9b4-3f95099bb98d", "platform": "Whatsapp", "type": "Private", "to": { "id": "me", "idType": "Opaque" }, "from": { "id": "ad498395-acba-4361-b9b4-3f95099bb98d", "idType": "Opaque" }, "time": "2025-01-21T17:26:13.286Z" },
system | 2025-02-21 17:36:20 UTC | #4
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: 31329