**NOTE: If you want to use the API on a site generated within CharityEngine's ecosystem of public applications (ex. CMS Shopping Cart, Web Forms, Advocacy, etc...), you have to ensure both prerequisites are fulfilled but you do NOT need to install the API on the site. The API will automatically be included. However, you will still need to set your API Key.
Prerequisite 1: Setting up /Finding your Key
- Navigate to Automation & Workflow > API > Web API
- If you see the orange banner alerting you to set up your key, click on the link outlined below.
**If the key has already been set up, you will see a value next to the Domain field.
- Once you have clicked on the link to configure your API key, you will land on the following page:
- Populate the Domain field with a key that makes sense for your organization. For example, if my organization's name is The Washington DC Homeless Fund, I would name my key "WDCHF".
- Click the Save button to save your key and other configuration.
**NOTE: If you already have a key or once your key is created, the API must be enabled for it to work on your associated sites:
Prerequisite 2: Adding the Domain of where you want to use the API
- Navigate to Automation & Workflow > API > Web API Urls
- Click on Create New if the domain does not already appear in the list
- Input the Domain name where you want to use the API and click ADD.
- The domain will now appear in the list.
Prerequisite 3: Enabling access to your website
**NOTE: You only have to do the following if your website is hosted by a Third-Party outside of CharityEngine (ex: Wordpress).
- Navigate to Online > Websites > Websites > Create New
- Select Third-Party (not hosted) for Type
- Enter a Name for your website and click the Save button in the upper right-hand corner of the page.
- Once the page refreshes, you will see a new tab for Domains. By default, the cms.charityengine.net domain is added. If you do not see the domain of your third-party website in the list of available domains, you can add it using the link at the top of the tab:
- You will now be navigated to a new page where you are able to add the domain for your third-party hosted site:
- Enter the domain for your website and hit the Save button. Once the page refreshes, you can use the blue back link (located in the upper left hand corner of the page next to heart/favorite icon) to navigate back to the domain tab of the site you just created. The newly created domain will appear in the list of available domains. Select it and then hit the add button to add the domain:
- Once the page refreshes, you will see that the new domain has been added. Remove the entry for cms.charityengine.net by clicking the DELETE link under the Actions column. Your list of domains should now include only the third-party hosted domain(s) where you would like use the CharityEngine Public API:
Installing the Public Web API
Install the CharityEnigne Web API by including the following code on your website:
Set your API Key
After installing the API, set your API key:
CE_API.SetApiKey('Your API Key');
If you are experiencing any unexpected behavior after following the directions above, visit our troubleshooting guide.