What is an Authentication Token?
An auth token is basically a short-term voucher that lets you show a system you’ve already been checked out and good to go. Instead of sending over your login details with every single request, the system gives you a token after you first log in and that’s the one that gets checked from then on.
How does an Authentication Token work?
You log in using your credentials the first time round and then the server gives you a token – usually a signed string like a JWT (JSON Web Token) that has an expiry date on it. What happens next is your app sends that token along with every subsequent request and the server knows to trust it because it’s got the password sorted already. When the token runs out you then either get a new one or log in again. Tokens are pretty much the safer way to go because they are limited in time and can be recalled, so you don’t have all your sensitive login info floating around the internet once you’ve first logged in.
How Onextel helps with Authentication Tokens
We use authentication tokens to keep API sessions secure once you’ve verified your credentials, so your app isn’t constantly sending your secrets across the network. Tokens will usually expire after a certain amount of time and can be either refreshed or revoked which means if a token does get leaked it only has a limited window in which it can be used and it can be killed off just as soon as something fishy turns up. When combined with API keys you get multiple levels of access control across all your messaging and voice services.
Why it matters
Sending full login details with each request is a pretty big risk – the more often that info is sent flying around the more chances there are for it to get picked up by someone. An authentication token scales that risk right back down to just that first login, and then swaps in a short-lived temp permission slip which is easy to recall. That’s basically what keeps your sessions secure, makes your integrations run smoothly and keeps your accounts safe even if a token slips out.
