API key

An API key is a secret string by which a service recognizes your program without logging in to the dashboard.

Updated · Prokso editorial team

The key is sent in a header of every API request. From it, the service understands whose account it is and what the program is allowed to do.

A key is the same as a password, only for programs. It is not published in code on GitHub and not sent in chats. If a key falls into the wrong hands, it is deleted and a new one is created.

Almost every API limits the number of requests per minute per key. This is the same rate limit.

In Prokso keys are created in the dashboard (Settings, then API), up to 5 keys, and are shown only once. The limit is 60 requests per minute per key. Methods are described on the API page.

What you can do with a Prokso key

  • read the balance, prices and the list of plans with the traffic left;
  • get proxy lines for a plan, the same as in the generator in the dashboard;
  • add and remove addresses in the plan's IP whitelist;
  • pause a plan, resume it and rename it;
  • buy a new plan or add gigabytes to an existing one, only from the balance.

The API spends only the money that is already on the balance: topping it up is done in the dashboard.

How to pass and store the key

The key goes into the Authorization: Bearer YOUR_API_KEY header or into X-API-Key. All addresses start with /api/v1; for example, a request to /api/v1/me returns your account data and balance. Keep the key in an environment variable such as PROKSO_KEY, not in the code itself. Do not put it into the request URL or a site's frontend: there it ends up in logs and in the page source.

You can have up to 5 keys, so give each script or server its own key. Then, if one leaks, you delete only that one, and the other integrations keep working.

How to stay within 60 requests per minute

Above the limit the API answers 429 with a Retry-After header: wait the stated number of seconds and repeat the request. Do not poll the balance or the plan list every second; for monitoring, once every few minutes is enough.

For purchases, send an Idempotency-Key header with a unique value. If the connection breaks and you repeat the request with the same key, the purchase is not duplicated. All methods with examples are on the API page.

FAQ

What should I do if a key leaks?

Delete it in the dashboard right away and create a new one. The old key will stop working.

Can I view a key again?

No, a key is shown only once when it is created. If you did not save it, create a new one.

Residential $1.59, mobile $2.50, datacenter $0.65 per GB

Sign up in a minute, get access right after payment.

Create account