I need to fetch the date a token expires from the api

I need to fetch the date a token expires from the API to renew my tokens
I tried to follow this documentation but i get error 401. my account is not org admin and i can’t access one. I need to somehow use the token itself to look up when it expires or something like that

The token is a JWT which you should be able to decode to read the expiry date. Here’s an example using Node.js:

import { decode } from 'jsonwebtoken'

const decoded = decode(accessToken, { json: true });
const expiryTime = decoded.exp * 1000 // This will give you the expiry time as a UNIX timestamp in milliseconds