I looked up other product implementation of the request method, and its exactly how I have done. Can someone please help me understand this issue better?
{"api_key":"xxxx","title":"sde-2","company_name":"FT - Test","description":"<p>need a knack for programming</p>","url":"https://visweshganesan.freshhr.com/jobs","billing_email":"careers@visweshganesan.freshhr.com","billing_country_iso_code":"IN","iparams":{},"isInstall":true}
@Janani - Just a small clarification here. On hitting this same call via Postman I am getting a proper success response. If the API key is invalid, this CSRF issue should pop up even while hitting a call from Postman right?
The success response from Postman is of the form:
This looks good. You normally get 400 error when you send the data in a wrong format.
But this says session Invalid CSRF, so that’s … tricky!
One thing you can do to debug is to compare what is being passed in your payload vs what is being passed at postman. Specifically look for headers, sometimes we miss some headers which are required hence we get this error.