β οΈ Important:
Before troubleshooting, ensure you have completed the setup steps in the API Overview article and that API access is enabled for your account.
Test API Access Using Postman
Postman is a widely used tool for testing API connections.
Install Postman and open a new request.
Enter the API endpoint URL, including your API Code in the path.
Set authentication using Basic Auth:
Username: Any descriptive value, such as API Testing.
Password: Your Access Key.
Add a header with Content-Type set to application/json.
Send the request and review the response.
π Note:
The API Code is a short identifier used in the URL. The Access Key is the long password generated in API settings.
Resolve 401 Authentication Errors
A 401 error indicates that authentication has failed.
Re-check the API Code in the URL.
Confirm the Access Key is correct and active.
Verify that your IP address is included in the allowed IP range for the Access Key.
β οΈ Important:
If all details are correct and you still receive a 401 error, contact Donorfy Support.
Test API Access Using Python
You can also test the API using Python and the requests library.
Create a session using HTTP Basic Authentication.
Add the required Content-Type header.
Send a simple GET request to confirm connectivity.
Example approach:
Build the base URL using your API Code.
Authenticate using a username and your Access Key.
Send a request to a known endpoint, such as a constituent record.
Using a reusable session simplifies testing multiple endpoints.
Use a Simple API Wrapper for Testing
For repeated testing, a lightweight wrapper class can help.
Store your API Code, username, and Access Key once.
Centralise request handling and error output.
Use helper methods for GET, POST, PUT, and DELETE requests.
This approach makes it easier to identify response errors and debug issues during development.
Understand Donorfy Support Scope
Donorfy Support can assist with platform-level issues.
They can help with:
Confirming API availability or outages.
Investigating suspected API non-compliance.
Verifying account-level configuration issues.
β οΈ Important:
Donorfy Support does not provide help with writing or debugging your code.
Get Help with Custom Development
If you need help troubleshooting your implementation:
Engage an approved Donorfy Partner with API expertise.
Share error messages, status codes, and example requests.
β οΈ Important:
The Donorfy API is a Professional only feature. Essential subscribers, please contact us to find out more about upgrading.
