Skip to main content

Tokens

Manage access tokens for report sharing.

Overview

Tokens provide authenticated access to reports without requiring user login. They can be used for:

  • Embedding reports in external applications
  • Sharing reports with unauthenticated users
  • API access with limited scope

Tokens can be local (server-side) or cloud-based (when cloud publishing is enabled).

GET /api/reports/{id}/tokens

Get all tokens associated with a report.

Authentication: Required

Path Parameters:

ParameterTypeDescription
idstringReport ID

Response:

{
"tokens": [
{
"id": "token-uuid-1",
"type": "report",
"reportId": "team:sales-dashboard",
"token": "abc123def456",
"cloud": false,
"createdAt": "2024-02-08T10:00:00Z",
"_links": {
"self": { "href": "/api/tokens/token-uuid-1" }
}
},
{
"id": "token-uuid-2",
"type": "report",
"reportId": "team:sales-dashboard",
"token": "xyz789ghi012",
"cloud": true,
"url": "https://cloud.informer.com/view/xyz789ghi012",
"createdAt": "2024-02-09T10:00:00Z",
"_links": {
"self": { "href": "/api/tokens/token-uuid-2" }
}
}
],
"warning": null
}

Response Fields:

FieldTypeDescription
tokensarrayArray of token objects
warningobjectError object if cloud token lookup failed (null on success)

Token Object Fields:

FieldTypeDescription
idstringToken UUID
typestringToken type (usually "report")
reportIdstringAssociated report ID
tokenstringThe actual token string
cloudbooleantrue for cloud tokens, false for local
urlstringPublic URL (cloud tokens only)
createdAtstringCreation timestamp

Behavior:

  1. Fetch local tokens - Retrieves tokens from the local database
  2. Fetch cloud tokens - If cloud is enabled, requests tokens from cloud platform
  3. Combine results - Returns both local and cloud tokens
  4. Handle errors - If cloud lookup fails, returns local tokens with warning

Use Case:

View all access tokens for a report to manage sharing and revoke access if needed.


Token Management

To create or manage tokens, use the Token API endpoints:

  • POST /api/tokens - Create a new token
  • GET /api/tokens/{id} - Get token details
  • DELETE /api/tokens/{id} - Revoke a token

See the Token API documentation for full token management capabilities.


Cloud Publishing Tokens

When a report is published to the cloud (see Cloud Publishing), a cloud token is automatically created. Cloud tokens have additional properties:

{
"cloud": true,
"url": "https://cloud.informer.com/view/{token}",
"type": "report"
}

The url field provides a public link that can be shared with external users.


Token Security

Best Practices:

  • Tokens provide full access to the associated report
  • Treat tokens as sensitive credentials
  • Revoke tokens when they are no longer needed
  • Use cloud tokens for public sharing
  • Use local tokens for controlled API access
  • Regularly audit token usage

Token Lifecycle:

  1. Creation - Token is generated with random string
  2. Active Use - Token provides access to report
  3. Revocation - Token is deleted and becomes invalid
  4. Cleanup - Unused tokens should be removed periodically

Using Tokens

API Access

# Access report with token
curl -H "Authorization: Bearer {token}" \
https://api.informer.com/api/reports/team:sales-dashboard

URL Parameters

https://app.informer.com/v/report.html?token={token}

Embed Code

<iframe src="https://cloud.informer.com/view/{token}"
width="100%" height="600px">
</iframe>

  • Cloud Publishing - Publish reports with public tokens
  • POST /api/reports/{id}/_cloud-publish - Creates cloud token automatically
  • Token API - Full token CRUD operations