Get started
Get started
First you need to generate a key and a secret which can be used to obtain the token. This can be found under Project -> Application

Initiate the SDK client as per the below. See the next section for more examples of how to use the SDK.
Initiate SDK Client
import { RocosSDK, Token } from "@dronedeploy/rocos-js-sdk";
const url = "api-automate.dronedeploy.com";
const appId = "<your application ID>";
const appKey = "<your application secret>";
const sdk = new RocosSDK({ url, appId, appKey });
const token = await sdk.getAuthService().getToken(); // example SDK call
Initiate SDK Client for Node.js
const rocos = require("@dronedeploy/rocos-js-sdk/node");
const url = "api-automate.dronedeploy.com";
const appId = "<your application ID>";
const appKey = "<your application secret>";
const sdk = new rocos.RocosSDK({ url, appId, appKey });