|
1 | 1 | # Managing API Keys
|
2 | 2 |
|
3 |
| -**API Key** is a unique string that is used to secure your API access. Every API Key is globally unique and exists only in your account. |
| 3 | +**API Key** is a string that is used to access API and identify requests to your Pixboost account. API Keys are globally unique. |
4 | 4 |
|
5 |
| -Once you [added at least one image source](adding-image-source.md) you will see the dashboard that will have "API Keys" section |
| 5 | +Once you signed up you have one API key that you can see in the dashboard: |
6 | 6 |
|
7 |
| - |
8 |
| - |
9 |
| -You will already have one active API Key that you can start using straight away. |
| 7 | + |
10 | 8 |
|
11 | 9 | You'll need to pass an API Key in a query parameter called "**auth**" in the transformation URL. For example:
|
12 | 10 |
|
13 |
| -[https://pixboost.com/api/2/img/pixabay.com/logo.png/resize?size=200&\*\*auth=MTg4MjMxMzM3MA\\](https://pixboost.com/api/2/img/pixabay.com/logo.png/resize?size=200&\*\*auth=MTg4MjMxMzM3MA\\)\_\*\*\_ |
14 |
| - |
15 |
| -You are able to delete and/or create new API Keys from the dashboard. You can use any API Key with any image source. |
16 |
| - |
17 |
| -There is a soft limit on number of keys. You can have only 10 active keys. But don't hesitate to reach us on [email protected] if you need more than 10. |
18 |
| - |
19 |
| -## Why you might need to have more than one API Key? |
20 |
| - |
21 |
| -The most useful case is when you have more than one website/application that is using Pixboost. |
| 11 | +To use the API key add it as a value in the "auth" query parameter when using API: |
22 | 12 |
|
23 |
| -**For example:** |
| 13 | +https://pixboost.com/api/2/img/pixabay.com/logo.png/resize?size=200&auth=MTg4MjMxMzM3MA |
24 | 14 |
|
25 |
| -Let's say you have two web sites: _**foo.com**_ and _**bar.com**_. |
| 15 | +You can create new API Keys from the dashboard and add a label to them, so you remember what you use each key for. Labels are only used for information and reporting purposes. |
26 | 16 |
|
27 |
| -You have added both of them to the image sources. |
| 17 | +> Be careful when **deleting** API keys. Any API requests that use deleted keys will be failing. |
28 | 18 |
|
29 |
| -Let's imagine that someone started using your transformed images from _**bar.com**_. We hope it would never happen though. |
| 19 | +Some useful examples of the label could include a website and environment. For instance: |
30 | 20 |
|
31 |
| -In case to prevent that you would need to create a new API key and start using it on _**bar.com**_. Once that done you can delete old API key. |
| 21 | +* dev |
| 22 | +* test-site-1 |
| 23 | +* prod-site-2 |
32 | 24 |
|
33 |
| -If _**foo.com**_ is also using the old API key then you would need to change it there as well. But, if you use different API Keys in the first place then you won't need to change both of your websites. |
| 25 | +There is a soft limit of 10 API keys per account. If you need more - please contact [support](mailto:[email protected]). |
0 commit comments