Skip to main content

API Tokens

Manage all the API tokens on the Pogodoc Dashboard.

What is an API Token

API tokens are secret tokens used to authenticate your requests with the Pogodoc API. They are unique to your account and should be kept confidential.

Plan Requirements

To generate and use API tokens, you need to be subscribed to a plan. This can be the free plan or any of our paid plans. If you're not currently on a plan, you'll be prompted to choose one before you can create a token.

You can have up to 10 active API tokens at any time. Deleted tokens don't count toward this limit.

Add API Token

You can create a new API token from the API Tokens page.

  1. Click Generate in the "Generate Tokens" section.
  2. Enter a descriptive name for your token (1-20 characters).
  3. Click Generate or press Enter to create the token.

API Token Generation

warning

For security reasons, you can only view the API token once. The token is automatically copied to your clipboard when generated. Make sure to save it in a secure location immediately.

Use Your API Token

Your API token is required to authenticate with the Pogodoc API. Here are the most common ways to use it:

SDK Integration

import { PogodocClient } from "pogodoc";

const pogodoc = new PogodocClient({
token: process.env.POGODOC_API_TOKEN!,
});

Environment Variables

# .env file
POGODOC_API_TOKEN=your_generated_token_here

Direct API Calls

curl -H "Authorization: Bearer your_token_here" \
https://api.pogodoc.com/your-endpoint

For more detailed integration examples, check out our Quickstart guide.

View All API Tokens

The API Tokens page shows you all the API tokens you have created along with their details.

Each token displays:

  • Name: The descriptive name you gave the token
  • Creation Date: When the token was generated
  • Document Count: Total number of documents processed using this token

The interface includes two tabs:

  • Active: Currently usable tokens
  • Deleted: Previously deleted tokens for audit purposes

Delete API Token

You can delete an API token when you no longer need it.

  1. Navigate to the Active tab in the "Your Tokens" section.
  2. Click the red Delete button next to the token you want to remove.
  3. Confirm the deletion in the dialog that appears.
info

Deleted tokens stop working immediately and cannot be restored. Any applications using a deleted token will receive authentication errors.

Best Practices

Token Security

  • Store tokens in environment variables, not in your code
  • Never commit tokens to version control
  • Use secure credential management systems in production

Token Management

  • Use descriptive names to identify token purposes
  • Generate separate tokens for different applications or environments
  • Regularly review and delete unused tokens
  • Monitor token usage through the document count metrics

Troubleshooting

Common Issues

Token not working

  • Check that you're including the token correctly in API requests
  • Confirm your subscription is active and in good standing
  • Verify the token is still active (not deleted)

Token generation failed

  • Maximum length is 20 characters
  • Ensure you're subscribed to a valid plan
  • Verify you haven't reached the 10-token limit