← Back to blog
TOKEN ROTATION nodetonet.com

Token rotation — when and why to cycle a paired device credential

N Nodetonet Team
April 28, 2026 7 min read

A Nodetonet token is the credential that lets a paired phone or PC connect into the platform as a proxy exit. It is also, naturally, a secret — anyone who holds it can stand up an agent on their own hardware and impersonate your device. So at some point you will need to rotate a token: invalidate the old one and issue a fresh secret to the same (or a replacement) device.

This guide covers every rotation trigger you are likely to encounter, what the rotation operation does on the wire, a quick comparison of your options, and the exact procedure for the worst case — "the device is gone and I can't touch it."

What is a Nodetonet token?

When you add a device to Nodetonet, the panel creates a token — a unique string that the Android agent app or the Windows .exe agent presents at connection time. The platform validates it, associates the connection with your account, and begins routing proxy traffic through that device's cellular or network connection.

Tokens are long-lived by default. That makes setup easy, but it also means a leaked token stays dangerous until you act. Rotation is how you act.

To understand what the token is protecting, see our post on what a mobile proxy is and how your first token and Android pairing works from day one.

When should you rotate a token?

There is no universal timer, but the following events should trigger an immediate rotation:

TriggerRisk levelAction
Token string exposed (Slack, screenshot, Git commit)CriticalRotate immediately
Team member with panel access left the organisationHighRotate all tokens they could read
Device stolen, lost or unaccounted forCriticalRotate (or delete) immediately
Device behaving abnormally — suspected malwareHighRotate, factory-reset, re-pair
Routine hygiene (90-day policy)LowRotate on schedule
Handover to a new operator or resellerMediumRotate before handing credentials

If you are a reseller running a white-label panel, a rotation policy is especially important — treat each customer's token as their own secret, and rotate on any access change. See the reseller and white-label overview for context.

What rotation actually does

Go to /tokens, find the row, and hit Rotate. In sequence the platform:

  1. Generates a new cryptographically random token string and writes it to the database in a single atomic transaction. The old string is immediately invalidated — there is no grace period.
  2. Sends a revocation message on the existing WebSocket connection to the agent: the device is told to disconnect.
  3. The agent disconnects within a second. The token row flips to OFFLINE.
  4. Any rotating proxy whose token group contained that device skips it in pool selection. Single-device proxies tied to the old token enter an error state until re-paired.
  5. The panel shows the new token string exactly once, in a modal. Copy it before closing.
Rotation is instant from the panel's perspective. If the device was offline at the moment you rotated, the revocation is enforced the next time it tries to connect — it will never get back in with the old string.

After copying the new token, open the agent on the paired phone or PC, replace the old token with the new one, and reconnect. Any proxies dependent on that token resume within seconds. If you manage many devices, see bulk operations for scripting approaches.

Rotate vs Delete — which to choose?

Rotation keeps the token row (and all proxy configurations that reference it) while swapping the secret. Deletion removes the row entirely.

The "device is stolen" procedure

This is the scenario rotation was built for. You cannot reach the phone; you do not want the thief running your proxy exit. Act in this order:

  1. Open the Tokens page and hit Rotate on the stolen device's row. The edge server force-disconnects the agent on the stolen device. The old token is permanently dead — it cannot reconnect.
  2. Check Audit logs and filter by the token ID. Look for suspicious traffic in the hours before you noticed the loss. If the device was used to route requests against your clients, you will see it here. Our post on audit logs explains how to read the output.
  3. Decide whether to re-pair a replacement device (Rotate path) or retire the slot entirely (Delete path).
  4. If the token group that contained the stolen device is used for a customer-facing proxy client, verify that client still has live devices in its pool — check its online member count before the customer notices degraded service.

Doing rotation from the API

Both rotation and deletion are available via the REST API, useful for automated hygiene scripts:

# Rotate — keeps the token row, replaces the secret
curl -X POST -H "Authorization: Bearer $KEY"   https://nodetonet.com/api/v1/tokens/<id>/rotate

# Delete — removes the token row and detaches dependent proxies
curl -X DELETE -H "Authorization: Bearer $KEY"   https://nodetonet.com/api/v1/tokens/<id>

For scripting first steps, see your first REST API call. If you issue tokens to customers rather than operating devices yourself, read customer API tokens vs personal for the scoped-token model that limits blast radius on any single rotation.

Preventing token leaks in the first place

Get started

Token rotation is available on all plans at no extra cost — it is a core part of credential hygiene. If you haven't already, create your free account, explore the full feature set, and check the proxy glossary for any concept above. Questions? Reach the team at support@nodetonet.com or on Discord.

Frequently asked questions

What happens to my proxies when I rotate a token?
Rotating proxy pools (token groups) immediately skip the rotated device and keep serving traffic from other members. Single-device proxies tied to that token enter an error state until you re-pair the device with the new token and it reconnects.
Does token rotation disconnect the device immediately?
Yes, if the device is online. The platform sends a revocation message over the existing connection and the agent disconnects within a second. If the device is offline at the time, revocation is enforced the next time it attempts to connect with the old token — it will not be allowed back in.
Should I rotate or delete a token when a phone is stolen?
Rotate if you plan to replace the phone and re-pair with a new device — all your proxy and group configurations are preserved. Delete if you are retiring the slot entirely. Either way the old credential is immediately revoked and the thief cannot use it.
How often should I rotate tokens as a routine practice?
There is no mandatory interval, but many security-conscious teams rotate long-lived device tokens every 90 days, mirroring common API key hygiene policies. Always rotate immediately on the event-based triggers — a leak, a departure, or a lost device — regardless of the schedule.
Can I rotate tokens via the API instead of the panel?
Yes. Send a POST request to /api/v1/tokens/<id>/rotate with your API key in the Authorization header. The response returns the new token string. This is useful for automated hygiene scripts or CI/CD pipelines. See the REST API guide to get started.
Does rotating a token affect the proxy credentials my clients use?
No. Device tokens and proxy client credentials are separate layers. Rotating a device token revokes the agent connection; it does not change the username/password your customers use to connect through the proxy endpoint. Proxy client auth is managed separately under proxy clients.
N

Nodetonet Team

Building Nodetonet — a prepaid proxy + tunneling platform that replaces ngrok, Cloudflared and a residential proxy provider with a single panel.

Related posts