The API's support a few different methods of authentication in addition to the normal session-based authentication used on the rest of CommCare HQ. This makes it easy to access these URLs programmatically.
The examples below use cURL.
See Wikipedia for details of basic authentication.
Example (will prompt for the password):
You can also include the password in the command as follows:
See Wikipedia for details of digest authentication.
Similar to Basic auth but add the
Api Key authentication
Your API Key can be found at https://www.commcarehq.org/account/settings/
If you use this method of authentication, you do not need to provide a 2 factor OTP header (this is only relevant for API calls with 2 factor auth required.)