πͺͺ Authentication
Authentication guide for our application.
Okay, let's put those little hands to work.
Prerequisites
Before installing our application, make sure you have the following:
- A project already initialized in some language.
- An active Dymo account and an API Key to connect to the API.
You can get your free API Key here.
Installation Steps
- Install Dymo API: Execute the command you need depending on your project settings.
npm install dymo-api@latest
#or
pnpm install dymo-api@latest
#or
yarn add dymo-api@latest
If you see that the version does not match the latest version of the library in npm, execute the following
npm cache clean --force
#or
yarn cache clean
npm i dymo-api@<last_version>
#or
pnpm i dymo-api@<last_version>
#or
yarn add dymo-api@<last_version>
- Initializes the client: Good! Now it's time to configure your API object.
- If you will use the feautures of the private branch, you must obtain your API Key, to do this go to your Dymo account.
- If you only want to use the features of the public branch, you don't need to configure any tokens.
import DymoAPI from "dymo-api";
const dymo = new DymoAPI({
apiKey: "PRIVATE_TOKEN_HERE"
});
The apiKey | api_key is required if you want to use the private branch features.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
rootApiKey | root_api_key | String | β | Internal API Key |
apiKey | api_key | String | β | API Key available to customers |
baseUrl | base_url | String | β | Local request (root token required) |
serverEmailConfig | server_email_config | ServerEmailConfig | β | Auth settings for the email client |
rules / email | Email Validation Rules | β | Rules for email protection |
rules / phone | Phone Validation Rules | β | Rules for phone protection |
rules / sensitiveInfo | sensitive_info | Sensitive Info Rules (Coming Soon) | β | Rules for sensitive info protection |