Sections in this category

Receiving API keys

  • Updated

Authentication

Take API authenticates all incoming requests using the API keys. Authentication secures the API data and ensures that it is accessible only to the identified users.

Every request to Take API must contain the API public key passed in the request header as a key-value pair, as follows:

Authorization: Bearer <PublicKey>,

where you replace PublicKey with the Public Key value generated in your Takeads account.

Depending on the information you want to access, you need to receive credentials for:

Receiving API keys for the account

To get API keys for the account, follow the steps below:

1. Log in to https://takeads.com/

2. In the navigation panel on the left, click on your account name, then select Access to API

3. On the page that opens, in the Origin field, enter the origin that will be authorized to make API requests. You can add multiple origins. If you have only one origin added, you can’t delete it, only replace.
The origin must include a scheme, domain, and port (if the port is any other than 80), for example https://fb.com:8080

4. The following credentials will be automatically generated:

  • Public key
  • Private key

After credentials are generated, add the Public key to the header when sending API requests.

To generate new credentials, click Regenerate credentials. When you regenerate credentials, all requests that use old credentials won’t be authenticated and processed.

Receiving API keys for the platform

Before receiving the credentials for the platform, make sure you have added this platform to your account. How to add a platform.

To get API keys for the platform, follow the steps below:

1. Log in to https://takeads.com/

2. In the navigation panel on the left, select Take API

3. In the Add your platform block, specify the type of your platform, and fill out the required fields. Click Add platform

4. In the Add authorized origins block, add the origin that will be authorized to make API requests. The origin must include a scheme, domain, and port (if the port is any other than 80), for example https://fb.com:8080

Enter the origin in the URI field, then click Add.
You can add multiple origins. If you have only one origin added, you can’t delete it, only replace.

5. The following credentials will be automatically generated:

  • Platform ID
  • Public key
  • Private key

After credentials are generated, add the Public key to the header when sending API requests.

To generate new credentials, click Regenerate credentials. When you regenerate credentials, all requests that use old credentials won’t be authenticated and processed.

Was this article helpful?

1 out of 1 found this helpful