Skip to main content

Hi,

We are unable to create contact using APIs on a react js application. We are facing the CORS policy blocking issue.
 

Please help us to fix the below error.
 


API URL:
'https://lawazem-744221652743434123.myfreshworks.com/crm/sales/api/contacts'

METHOD:
post

​​​​​​​

Hi.

I’d suggest to submit this in the Developers Community instead:

Freshworks Developer Community

 

On the other hand, this was posted on FreshDesk community but flagged as FreshSales, and according to your API URL, it seems it is indeed FreshSales.

Tagging @alyssia.correa @Kamakshi V just in case.

 

Regards,


Hi Hegery.

 

Thank you for reaching out to us. I am Pradipta, from the Freshsales team.

As per our CORS policy, no websites can directly use our API from their front end. This is the expected behaviour as per our security measures.
Since you are trying to create a contact from your website, we suggest 2 solutions that you can use:

  1. Invoking CRM api from your proxy server/middleware. This will avoid this issue as CORS issue will occur only if you try to access the APIs directly from your frontend. You can fix the issue by following the steps mentioned in the following articles:
    https://developer.mozilla.org/en-US/docs/Glossary/CORS
    https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors/CORSMissingAllowOrigin

  2. You can also make use of CRM tracking code feature.

Please feel free to let us know if you need any further assistance or drop us an email to crm-support@freshworks.com.


Reply