Skip to content

Revoke a refresh token

POST
/oauth/revoke
curl --request POST \
--url https://api.nsin.ir/oauth/revoke \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data token=example \
--data client_id=example \
--data client_secret=example

Revokes a refresh token and every token rotated from the same login — this is what a relying party calls on sign-out. Access tokens are short lived and are not tracked; they stop working when they expire, or sooner if the underlying NSIN session is revoked.

Per RFC 7009 the answer is always 200, whether or not the token existed: an error would turn this endpoint into a way to test tokens. A confidential client must send its secret, or the request is a silent no-op.

object
token
required

The refresh token to revoke.

string
client_id
required
string
client_secret

Required for confidential clients; without it the call is a silent no-op.

string
Example generated
token=example&client_id=example&client_secret=example

Always, regardless of whether anything was revoked.

Media type application/json
object
ok
boolean
Example generated
{
"ok": true
}