Follow the shortest path from API account credentials to your first successful request.
Deeply API provides REST endpoints for central server integration and WebSocket interfaces for real-time events. If you are new here, complete these three steps first.
API account credentials: username and password used only to issue tokensAccess Token: Bearer token used for normal API requests and WebSocket connectionsRefresh Token: token used only to reissue an access tokenAPI account credentials are not issued from the dashboard. Request them from contact@deeplyinc.com, and Deeply will send them to you by email.
Send the API account credentials to Issue Token, then use the returned access token for normal API calls.
const response = await fetch('http://{{EDGE_IP}}:8100/api/v1/auth/token', {
method: 'POST',
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"username": "api",
"password": "YOUR_PASSWORD"
})
});
const data = await response.json();The response contains access_token, refresh_token, token_type, and expires_in. When the access token expires, use the refresh token with Reissue Token.
After token issuance, List Events is the fastest endpoint to validate your integration.
const response = await fetch('http://{{EDGE_IP}}:8100/api/v1/events?page=1&size=10', {
method: 'GET',
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
});
const data = await response.json();All REST API requests use the following local base URL by default.
http://{{EDGE_IP}}:8100
If you want to validate the public HTTPS environment, you can also test with https://openapi.deeplyinc.com.
The items below apply when you test against https://openapi.deeplyinc.com:
For firewall and proxy configurations for https://openapi.deeplyinc.com:
https://openapi.deeplyinc.com or allow all public IP addressesNote: Properly configured DNS cache helps prevent requests to stale IP addresses.
For normal API requests, include:
Content-Type: application/json; charset=utf-8Authorization: Bearer YOUR_ACCESS_TOKENToken issuance (POST /api/v1/auth/token) does not use an Authorization header. Token reissuance uses Authorization: Bearer YOUR_REFRESH_TOKEN.
Postman is an API client that simplifies API usage. To facilitate integration with Deeply, a Postman Collection is provided.
Fork the collection, then configure POST /api/v1/auth/token with Content-Type: application/json and your API account credentials (username: "api", password: "YOUR_PASSWORD"). Use the returned access_token as the Bearer token for normal API requests and the refresh_token as the Bearer token for GET /api/v1/auth/reissue. Store both tokens returned after reissuance.