Access and manage API keys and OAuth 2.0 application credentials with REST JS.
Node.js
To use ArcGIS REST JS in a backend or Node.js application, first install the package using your preferred package manager, such as NPM or Yarn.
npm install @esri/arcgis-rest-developer-credentialsOnce installed, you can import or require modules depending on your Node setup.
ES modules
import { createApiKey } from "@esri/arcgis-rest-developer-credentials"CommonJS
const createApiKey = require("@esri/arcgis-rest-developer-credentials");CDN
You can load ArcGIS REST JS directly in the browser using CDN with a global object or with an import map.
Global object
<script src="https://unpkg.com/@esri/arcgis-rest-developer-credentials@2.1.0/dist/bundled/developer-credentials.umd.min.js"
integrity="sha512-eNGxsq2lOkQ9uARzlbDLLQCVA9VK0hjt6j18aTxlnscll8lC7NqQHmO3bAm9MLbhBpOszOutcQTGYRHxJ3Nc9w==">
</script>
<script>
import { createApiKey } from "@esri/arcgis-rest-developer-credentials";
</script>Import map
<script type="importmap">
{
"imports": {
"@esri/arcgis-rest-developer-credentials": "https://esm.run/@esri/arcgis-rest-developer-credentials@2.1.0"
}
}
</script>
<script type="module">
import { createApiKey } from "@esri/arcgis-rest-developer-credentials";
</script>Exports
- createApiKey
- createOAuthApp
- getApiKey
- getOAuthApp
- getRegisteredAppInfo
- invalidateApiKey
- registerApp
- slotForKey
- unregisterApp
- updateApiKey
- updateOAuthApp
- IApiKeyInfo
- IApiKeyResponse
- IApp
- ICreateApiKeyOptions
- ICreateOAuthAppOption
- IDeleteApiKeyOption
- IDeleteApiKeyResponse
- IDeleteOAuthAppOption
- IDeleteOAuthAppResponse
- IGetApiKeyOptions
- IGetAppInfoOptions
- IGetOAuthAppOptions
- IInvalidateApiKeyOptions
- IInvalidateApiKeyResponse
- IOAuthApp
- IOAuthAppInfo
- IRegisterAppOptions
- IRegisteredAppResponse
- IUnregisterAppOptions
- IUnregisterAppResponse
- IUpdateApiKeyOptions
- IUpdateOAuthOptions
- AppType
- Privileges