mjazz
October 9, 2023, 6:40pm
1
I want to create KB using RestAPI and I am not able to get the response.
I am new at data extraction using REST API and I want a guide on how can I get the response.
My curl call in git bash:
curl -X POST https://api.tawk.to/v1/knowledge-base.article.list \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
-d {}
Response:
{"ok":false,"error":"auth_error","message":"invalid_auth"}
bash: -d: command not found
How can get the list of KB articles?
1 Like
Hi Mjazz, did you have any luck with this? I’m having the same problem
mjazz
November 7, 2023, 4:16pm
3
Hello,
Yes, We have to use Basic auth not 2Oauth method.
Here is the code for getting the list of KB for a snippet
curl -X POST https://api.tawk.to/v1/knowledge-base.article.list
-H ‘Content-Type: application/json’
-H ‘Accept: application/json’
-H ‘Authorization: Basic YOUR REST API KEY’
-d ‘{“propertyId”:“YOUR PROP ID”,“siteId”:“primary”}’
Thanks,
Miheer Jasani
miheerjasani@meprotech.in
1 Like