CLI Ā· Account
buyproxy login
Save your API key so every command just works.
Usage
$ buyproxy login [--key bp_key_ā¦]login stores your API key locally after checking it with BuyProxy, so you don't have to pass it every time. Both personal (bp_key_ā¦) and reseller (bp_live_ā¦) keys work; the CLI detects which and shows the right menu.
Options
| Option | What it does |
|---|---|
| --key <key> | Provide the key non-interactively instead of being prompted. |
Plus the global options (--json, --key, --no-color, --help).
How it works
- Create a key under Dashboard ā API keys (personal) or Dashboard ā Reseller ā API keys.
- Run
buyproxy loginand paste it ā the characters are masked as you type. - The CLI checks the format, then asks BuyProxy who the key belongs to. If it's rejected, nothing is saved.
- It's written to
~/.config/buyproxy/config.json(or$XDG_CONFIG_HOME/buyproxy/) with permissions0600, readable only by you.
Prefer not to store a key at all? Set BUYPROXY_API_KEY in your environment instead ā it's used automatically.
Examples
Interactive
$ buyproxy login? Paste your API key ā¢ā¢ā¢ā¢ā¢ā¢ā¢ā¢ā¢ā¢ā¢ā¢
ā Key verified
ā Logged in as you@example.com (pro plan)
Saved to /home/you/.config/buyproxy/config.jsonIn CI
$ echo "$BUYPROXY_API_KEY" | xargs buyproxy login --keyOr skip login entirely and export BUYPROXY_API_KEY for the job.
JSON output
--json prints { "ok": true, "email": ā¦, "label": ā¦, "kind": "personal" | "reseller" }.
Troubleshooting
| You see | How to fix it |
|---|---|
| That doesn't look like a BuyProxy API key. | Keys start with bp_key_ (personal) or bp_live_ (reseller) followed by hex characters. |
| BuyProxy rejected that key. | It may have been copied incompletely or revoked ā create a fresh one. |
Tips
On shared machines, prefer the environment variable and avoid
--key, because command-line arguments can show up in process listings and shell history.
Related commands
Was this page helpful?