carto.js/docs/reference/02-authentication.md
2020-06-13 18:34:34 +08:00

849 B

Authentication

CARTO.js v4 requires using an API Key. From your CARTO dashboard, click Your API keys from the avatar drop-down menu to view your uniquely generated API Key for managing data with CARTO Engine.

Your API Keys

Learn more about the basics of authorization, or dig into the details of Auth API, if you want to know more about this part of CARTO platform.

The examples in this documentation include a placeholder for the API Key. Ensure that you modify any placeholder parameters with your own credentials. You will have to supply your unique API Key to a carto.Client.

var client = new carto.Client({
    apiKey: 'YOUR_API_KEY_HERE',
    username: 'YOUR_USERNAME_HERE'
});