For the complete documentation index, see llms.txt. This page is also available as Markdown.

Authentication methods

All requests to the CARTO APIs (and therefore all developments using CARTO) must be authenticated. When starting a project or building an application, we recommend choosing one between these three strategies:

  • Authentication via API Access Tokens: These types of permanent tokens are simple, easy to generate, restrictive, and not tied to specific users. You can use them directly to authenticate your requests. Read more about API Access Tokens.

  • Authentication via Single Page OAuth Client: Authenticate each user separately by presenting them a login where they need to introduce their CARTO credentials — or their SSO credentials if configured. Once set up, your app will obtain and use OAuth Access Tokens for each user independently. Read more about Single Page Applications.

  • Authentication via Machine-to-Machine OAuth Client: Obtain an OAuth Access Token on demand (using a backend application) without the user having to log in and use it to authenticate all your requests. Read more about Machine-to-Machine Applications.

If you host your application with Hosted Apps, currently in Private Preview, you do not implement any of these flows yourself. CARTO signs the user in and hands your application that user's own OAuth Access Token at runtime, so there is no OAuth client to create and no credential in your code. See Hosted Apps and the runtime and authentication reference.

Last updated

Was this helpful?