HI, I have created a webhook from contentful cms like below, using post method.
POST: https://host-ucy3pj.api.swiftype.com/api/as/v1/engines/national-parks-demo/documents
.
But it fails to send data into the Appsearch. Below is the error I get in the Response body.
Response body
{ "error": "You need to sign in or sign up before continuing." }
With a status : "status": "401 Unauthorized"
.
Obviously I can understand we need to send the private key as well. However when I try to add the private key in the options, my contentful does not accept, it throws error "Please provide a valid webhook URL." when I try to set the webhook in the below format.
https://host-ucy3pj.api.swiftype.com/api/as/v1/engines/national-parks-demo/documents -H 'Content-Type: application/json' -H 'Authorization: Bearer private-REDACTED'
Could you please suggest how to create a webhook from any system into the Appsearch Endpoint? This is very crucial for our project as we intend to send the data from our contentful into the Appsearch, and then our MobileApp must be able to show results from the Appsearch index.
Please provide your valuable inputs.