Learn about our newest features and enhancements!
Developer: API - Public API Troubleshooting

Introduction

So, you've set up Web2CRM tracking or an Embedded Donation Form, but things just aren't working as planned.  Below are a few tips on what to check based on the type of error you're receiving.



CORS Error

Condition 1: You are seeing the following error in the development console of your browser:

Access to XMLHttpRequest at 'https://cas.bisglobal.net/dsp_bis_cas_tpAuth.aspx' from origin 'https://mywebsite.com' has been blocked by CORS policy


Condition 2: You are trying to use the API on a third-party website not hosted by CharityEngine (ex. a Wordpress site).


Resolution
:  Add your website's domain to the CharityEngine CMS as a third-party site.  Instructions for that can be found here at Instructions - Enable Access to Your Website (3rd party websites).



Authentication Error

Condition 1: You are seeing the following message in the development console of your browser:

Authorization failed (ensure website is authorized or try using authenticated event)

Resolution
:  Add your website's domain to the list of approved Public API domains.  Instructions for that can be found here at Instructions - Enabling Access to Your Website (3rd party websites) noting step 11 has been addressed. 

Condition 2: Upon submission, the following message appears on your website:

authentication failed

Resolution
:  Set your API key after your inclusion of the Public API:

<script type="text/javascript">

    CE_API.SetApiKey('Your API Key');

</script>

Powered by Powered By CharityEngine