DiscussionSLA

API Token Usage Guide

Published 11 days ago

Resources

Published 11 days ago

profile_photo

Y0K0

Admin

Updated 11 days ago

0

Overview

This document provides comprehensive guidelines for using API tokens to authenticate and access platform application interfaces. API tokens are essential for secure communication between your application and our platform services.

Authentication

Obtaining an API Token

  1. Log in to the SafePoint
  2. Navigate to Account > API Token
  3. Click "Generate"
  4. Securely store your token immediately after generation

Security Best Practices

  • Never commit API tokens to version control
  • Store tokens in environment variables or secure secret management systems
  • Rotate tokens regularly (recommended every 90 days)
  • Implement token revocation procedures for compromised tokens

Using the API Token

Request Headers

Include the API token in the Authorization header of your HTTP requests:

1X-SafePoint-API-Token: your_api_token_here

Example Request

1curl https://safeline.app.secx.cloud/api/v1/product/license \
2  -H "X-SafePoint-API-Token: your_api_token_here" \
3  -H "Content-Type: application/json"

Rate Limiting

  • Standard rate limit: 100 requests per minute
  • Burst limit: 200 requests per minute

Error Handling

Common HTTP Status Codes

  • 200 OK: Request successful
  • 400 Bad Request: Invalid request parameters or body
  • 401 Unauthorized: Invalid or missing API token
  • 403 Forbidden: Insufficient permissions
  • 500 Internal Server Error: Server-side error

Error Response Format

1{
2  "code": 500,
3  "message": "Human-readable error message"
4}

Token Expiration

  • Default token expiration: No expiration (permanent)
  • Tokens remain valid until explicitly revoked
  • It is recommended to rotate tokens periodically for security purposes

Support

For additional assistance with API token management:

Related Posts