For months, I’ve been trying to use the REST API; however, the support hasn’t been able to assist me, and errors consistently occur. Thanks to another thread in this forum, I learned that I needed to create an empty field for the body to retrieve the propertyId. Unfortunately, that’s the only progress I’ve made. I attempted to fetch the list of chats or any other information using the REST API with Basic Auth, but it seems to be simply impossible.
I sent the following request:
curl --location ‘https://api.tawk.to/v1/ticket.list’
-H “Content-Type: application/json”
-u XXXXX:
-d ‘{
“propertyId”: “YYYYYY”,
“size”: 0,
“startDate”: “2023-11-01T14:15:22Z”,
“endDate”: “2023-11-17T14:15:22Z”,
“messageCount”: 0,
“deleted”: false,
“status”: “closed”,
“tags”: [
“string”
],
“sort”: “co-new-old”,
“dateType”: “cso”
}’
I’ve tried various versions of this request, but the response remains the same:
{
“ok”: false,
“error”: “auth_error”,
“message”: “invalid_auth”
}
The only way I managed to retrieve the propertyId was with the following command:
curl --location ‘https://api.tawk.to/v1/property.list’
–header ‘Content-Type: application/x-www-form-urlencoded’
–header ‘Authorization: Basic XXXXXXXX’
–data-urlencode ‘=’
What can I be doing, or what should I do, to retrieve the list of chats?