Search code examples
facebook-javascript-sdknetsuite

405 when connecting to webhook callback url for leadgen


when trying the lead ads testing tool, i am receiving 405 error. the method is POST and I am sure that my callback url is accepting a POST method. can anyone enlighten me to resolve this error?

Another note is that the callback url is a netsuite external suitelet link, so NS gurus might be able to help as well.


Solution

  • See my answer here but basically NetSuite external suitelets require that the User Agent in the request header claims to be a web browser. The best workaround I have found is to use a middleware lambda function to proxy the request.