REST API knowledge exchange
Post Reply
mjr.epicfail
Veeam Legend
Posts: 637
Liked: 183 times
Joined: Apr 22, 2022 12:14 pm
Full Name: Danny de Heer
Contact:

VBR 13 rest api 1.3-rev1 refreshtoken lifetime

Post by mjr.epicfail »

Hi all,

Maybe im reading the docs wrong, but according to the documentation the refreshtoken lifetime should be access token lifetime plus 15 minutes.
In this case a access token has a lifetime of 15 minutes so the refreshtoken should be 30 minutes.

While testing this, I noticed that the refreshtoken is 24 hours, no matter if the property use_short_term_refresh is set to true or false

True:

Code: Select all

curl -X 'POST' \
  'https://[serverIP]:9419/api/oauth2/token' \
  -H 'accept: application/json' \
  -H 'x-api-version: 1.3-rev1' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'grant_type=Password&username=[user]&password=[password]&refresh_token=string&code=string&use_short_term_refresh=true&vbr_token=string'

Code: Select all

  "exp": 1767727153,
  "iat": 1767640753,
  "nbf": 1767640753,
  "refresh_chain_id": "3683b357-d07e-42ac-a144-60615af11141",
False:

Code: Select all

curl -X 'POST' \
  'https://[serverIP]:9419/api/oauth2/token' \
  -H 'accept: application/json' \
  -H 'x-api-version: 1.3-rev1' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'grant_type=Password&username=[user]&password=[password]&refresh_token=string&code=string&use_short_term_refresh=false&vbr_token=string'

Code: Select all

  "exp": 1767727251,
  "iat": 1767640851,
  "nbf": 1767640851,
  "refresh_chain_id": "e374829e-97f7-47ee-8a06-4a990e7ee6e3",
VMCE / Veeam Legend 2*
david.domask
Product Manager
Posts: 3976
Liked: 966 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: VBR 13 rest api 1.3-rev1 refreshtoken lifetime

Post by david.domask »

Hi mjr.epicfail,

I'm seeing something similar, the use_short_term_refresh doesn't seem to affect the resulting lifetime value (though by default mine is 15 minutes for both password and refresh token grants, do you have the config parameter ️RefreshTokenLifetimeHours set by chance in registry / config files?)

Please open a support case and let Veeam Support review the behavior. Please share your case number once created, thanks!
David Domask | Product Management: Principal Analyst
mjr.epicfail
Veeam Legend
Posts: 637
Liked: 183 times
Joined: Apr 22, 2022 12:14 pm
Full Name: Danny de Heer
Contact:

Re: VBR 13 rest api 1.3-rev1 refreshtoken lifetime

Post by mjr.epicfail » 1 person likes this post

Hi David,

No, its a "vannila" installation.
Im currently investiging a different issue with Support on this "test" server. Ill create a new case for investigion after that is concluded.
VMCE / Veeam Legend 2*
jeronimo
Enthusiast
Posts: 28
Liked: 2 times
Joined: May 04, 2026 12:34 pm
Contact:

Re: VBR 13 rest api 1.3-rev1 refreshtoken lifetime

Post by jeronimo »

@mjr.epicfail Did you get some more information?

I haven't tried finding out empirically how long it's really valid, but certainly it's not 14 days as the documentation suggests.

(I'm not using short lifetime setting)

BTW I'm on 13.1.1.
david.domask
Product Manager
Posts: 3976
Liked: 966 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: VBR 13 rest api 1.3-rev1 refreshtoken lifetime

Post by david.domask »

Hi jeronimo,

As noted in my previous post, open a Support Case. If the product is not behaving as described in the documentation, it's a technical issue and such issues must go through Veeam Support as per the forum rules.
David Domask | Product Management: Principal Analyst
jeronimo
Enthusiast
Posts: 28
Liked: 2 times
Joined: May 04, 2026 12:34 pm
Contact:

Re: VBR 13 rest api 1.3-rev1 refreshtoken lifetime

Post by jeronimo »

No worries, I will. Just thought @mjr.epicfail (OP) might have some apriori knowledge since his post is already more than half a year old.
That might have accelerated diagnosis.
But since he didn't post a case number and we're on the very latest release, I guess nothing happened.

BTW "If the product is not behaving as described in the documentation, it's a technical issue"
I have seen issues that were in the end classified "documentation bugs".
No hard feelings, just sayin' ;)
mjr.epicfail
Veeam Legend
Posts: 637
Liked: 183 times
Joined: Apr 22, 2022 12:14 pm
Full Name: Danny de Heer
Contact:

Re: VBR 13 rest api 1.3-rev1 refreshtoken lifetime

Post by mjr.epicfail »

sorry to be so late to this party.
No I didnt create a supportcase for this, hence the missing case number.

@Jeronimo, its best to open a case.
The fact that the setting of the property doesnt change the outcome rules out a documentation error, or at least thats my opinion.
VMCE / Veeam Legend 2*
Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests