Popular Help Content

No popular content.

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


The examples below use cURL

Basic authentication

See Wikipedia for details of basic authentication.


Code Block
curl -v -u [USERNAME]:[PASSWORD] '[URL]'

Api Key authentication

Your API Keys can be found at https://www.commcarehq.org/account/api_keys/


Code Block
curl -H "Authorization: ApiKey [USERNAME]:[API_KEY]" '[URL]'

Two-Factor authentication

If you have two factor authentication (2FA) set up on your account, then basic authentication is not directly supported for accessing APIs. Instead, you must use Api Key authentication, as described above, or pass in a two factor token generated via SMS or your authenticator application via the "otp" url parameter. For example: https://www.commcarehq.org/a/<domain>/api/v0.5/case/?otp=123456