API access token duration

Hello everyone
How long is an access_token from oauth2 valid?

depends by the specifications, but on average from 1 to 5 minutes, but even an hour, but with the access token they also give you a refresh token to request a new access token without asking for login credentials again