Some APIs Want More Than a Token
A bearer token works like cash: the API does not ask who is holding it. If it leaks through a log or a bad commit, the thief can use it until it expires. For sensitive systems, providers want a second proof that is much harder to steal.
Two kinds you will see
- Mutual TLS (mTLS): normally only the server shows a certificate. With mTLS your side shows one too, and proves it holds the private key. Under RFC 8705, the access token can be bound to your certificate, so a stolen token alone no longer works.
- Signed requests: you compute a signature over key parts of the request, like the method, path and a hash of the body, and send it with the call. If a signed part changes on the way, the signature no longer matches. Many providers have their own scheme; RFC 9421 is the general standard.
Certificates expire too
Every certificate has an end date. When yours passes it, the provider refuses the connection, and nothing in your code has changed. Write the dates down where code can read them, and alert well before the day.
echo | openssl s_client -connect api.github.com:443 -servername api.github.com 2>/dev/null | openssl x509 -noout -datesShows the start and end dates of a server’s certificate. I ran it in Git Bash on 2026-09-23: notBefore=Aug 30 2026, notAfter=Nov 27 2026. Under three months.
Keep private keys and certificates in a secret store, never in the repo. It is more setup, but a leaked token alone is no longer enough to get in.
Do this in 60 secondsRun the openssl command above against an HTTPS site you depend on and read the notAfter date. If a certificate you own expired that day, who would find out first, you or a customer?
Today’s AI angleWhen an AI agent calls a bank API through a tool, the certificate and signing key stay in the tool layer, never in the prompt. The model asks for an action; the tool signs and sends it.