TrollflixDevelopers
API keys

Create an API key

Create your API key. The full key is returned once, in this response only.

POST https://backend.trollflix.com/api/php/user_settings/create_api_key

Creates your API key. Each account can have one key; to replace it, use Rotate. Requires a signed-in session.

Shown once

api_key in this response is the only time the full key is ever returned. Store it right away. If you lose it, rotate the key to get a new one.

Request

No parameters. Send an empty JSON object.

POST /api/php/user_settings/create_api_key
Content-Type: application/json

{}

Response

{
  "success": true,
  "error_message_code": null,
  "api_key": "tfx_3f9a1c2b7d4e5f60718293a4b5c6d7e8f90a1b2c3d4ec2b1",
  "key": {
    "key_hint": "tfx_3f9a...c2b1",
    "created_at_unix": 1790841600,
    "rotated_at_unix": null,
    "last_used_at_unix": null,
    "uses_count": 0
  }
}
{
  "success": false,
  "error_message_code": "api_key_already_exists",
  "api_key": null,
  "key": null
}

Prop

Type

On this page