From 41d2763f9f5d5cb39f3c5774b4af11a66de6970d Mon Sep 17 00:00:00 2001 From: "juraj.bacovcin" Date: Tue, 6 Feb 2024 09:55:18 +0100 Subject: [PATCH] playing around with authentication --- categories/subscriptions/openapi.yml | 44 ++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/categories/subscriptions/openapi.yml b/categories/subscriptions/openapi.yml index 001eea2..b566c28 100644 --- a/categories/subscriptions/openapi.yml +++ b/categories/subscriptions/openapi.yml @@ -23,6 +23,8 @@ paths: $ref: categories/subscriptions/paths/v3_subscription_post.yml get: $ref: categories/subscriptions/paths/v3_subscription_get.yml + security: + - X-API-Key: [] put: $ref: categories/subscriptions/paths/v3_subscription_put.yml delete: @@ -42,3 +44,45 @@ paths: /v3/subscription/webhook/count: get: $ref: categories/subscriptions/paths/v3_subscription_webhook_count_get.yml +components: + securitySchemes: + X-API-Key: + type: apiKey + name: x-api-key + in: header + description: | + The **API key** represents your [pricing plan](https://tatum.com/pricing) and defines how many API calls + you can make per second and what the total number of API calls per month is available for you. + + One API key must be used by only one person. + + Choose one of the following authentication methods: + + * **Provide the API key in each API call.** + + To obtain the API key, [create a Tatum account](https://dashboard.tatum.com). Once you are logged in, + you are automatically assigned the Free plan. + + With the Free plan: + * You get two API keys, one tied to the testnet of a blockchain and the other to the mainnet. + * You can make up to five API calls per second. + + When making an API call, provide the appropriate API key (testnet or mainnet) as either an HTTP header. + + If you ever need your API keys, you can find them in [your Tatum account](https://dashboard.tatum.com/). + + * **Get an auto-generated API key attached to API calls.** + + Make an API call without any API key provided. The API key will be generated and tied to your IP address. + This API key is stored within the Tatum platform and is automatically attached to all your API calls. + + With the auto-generated API key: + * You can make up to five API calls per second. + + These limits are applied to both the testnet and mainnet. + + By default, API calls with the auto-generated API key are executed against the mainnet. + To make an API call to the testnet, add the `type` query parameter set to `testnet` to the endpoint URL, + for example: + + `https://api.tatum.com/v1/subscription?type=testnet`