Skip to content

API Key Management

API keys provide a secure way to authenticate with Slink’s API for external integrations and automated uploads. They’re perfect for tools like ShareX or custom scripts that need to upload images programmatically.

  1. Navigate to Your Profile

    Go to your user profile page and click on the “API Keys” tab.

  2. Create New API Key

    Click the “Create API Key” button to open the creation dialog.

  3. Configure Your Key

    • Name: Give your API key a descriptive name (e.g., “ShareX Upload Key”, “Automation Script”)
    • Expiry Date (Optional): Set an expiration date for enhanced security, or leave empty for a permanent key
  4. Save and Store Securely

    Once created, copy and store your API key immediately. It will only be shown once and cannot be recovered if lost.

API keys are used in the Authorization header with the Bearer prefix:

Terminal window
curl -X POST \
-H "Authorization: Bearer sk_your_api_key_here" \
-F "image=@/path/to/your/image.jpg" \
https://your-slink-instance.com/api/external/upload

Upload Image:

  • Endpoint: POST /api/external/upload
  • Authentication: Required (API Key)
  • Body: Multipart form data with image field
  • Response: JSON with image URL and metadata

ShareX Integration:

  • Endpoint: GET /api/user/sharex-config?baseUrl=<url>&apiKey=<key>
  • Authentication: Required (User login)
  • Response: ShareX configuration file (.sxcu)

Slink can generate a ready-to-use ShareX configuration from an API key. For setup, see the ShareX Integration guide.