Skip to main content
For secure access to protected resources, requests to the Mangrove API need to be authenticated in order to identify the requesting party and their role.

Prerequisites

To connect to the API, make sure you have the following prerequisites in place:
  • An API token. Open Settings → API Tokens, create a token, and copy it. The token is shown once.
  • The permissions the endpoints you are calling need. Permissions are granted by area, each with a read and a write tick box: Data Collection, Accounting and Reporting, Credit Inventory, Account Admin, Data Rules, and Compliance Calendar. Ticking an area grants the project read access it depends on. A token without the permission an endpoint needs gets a 403 Forbidden.

Making Authenticated API Requests

Include the token in the Authorization header of your HTTP request. Pass the raw token, with no Bearer prefix:

Error Handling

Ensure your implementation handles various error scenarios, including token expiration, unauthorized access, and network errors.