I need specify an access token in the authorisation header to get the access code, but I need the authorisation code to get the access token ??? Do I just use grant_type=password to get the initial access token, then use that to then generate an access code? Am I missing something?in the Authorization header — currently valid access token in the Bearer <access_token> format
-
- Veeam Vanguard
- Posts: 629
- Liked: 251 times
- Joined: Sep 27, 2011 12:17 pm
- Full Name: Craig Dalrymple
- Location: Scotland
- Contact:
authorization using the Authorization Code
Trying to work with V11 REST APIs, I can get it working with username/password grant type but looking at the authorisation code way ....stuck trying to figure out how to form the request to get initial authorisation code. Following the instructions here https://helpcenter.veeam.com/docs/backu ... ml?ver=110
-
- Veteran
- Posts: 1143
- Liked: 302 times
- Joined: Apr 27, 2020 12:46 pm
- Full Name: Natalia Lupacheva
- Contact:
Re: authorization using the Authorization Code
Hi Craig,
Yes, you need to use a password to get an authorization code and then, when you get auth code, you can use it.
So you can first put grant_type = password to get authorization code and then change grant_type to use the value you've got on the first step.
Thanks!
Yes, you need to use a password to get an authorization code and then, when you get auth code, you can use it.
So you can first put grant_type = password to get authorization code and then change grant_type to use the value you've got on the first step.
Thanks!
-
- Veeam Software
- Posts: 2010
- Liked: 670 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: authorization using the Authorization Code
Natalia is correct. However, I tested it in postman and it doesn't work that way. Sending an access token to /api/oauth2/authorization_code, I get 401 Unauthorized error. Though the token is valid and non-expired. I'm going to recheck it with QA the coming week and let you know on the outcome. Thanks!
-
- Veeam Vanguard
- Posts: 629
- Liked: 251 times
- Joined: Sep 27, 2011 12:17 pm
- Full Name: Craig Dalrymple
- Location: Scotland
- Contact:
Re: authorization using the Authorization Code
Thanks Oleg, funny you should mention the 401 error, I've been working with Squared Up and their API dashboards, and noticing when the API token expires, and we regenerate a new session token, a 403 is being return. Got their SEs looking from a Squared Up perspective, but if you're seeing similar issues with the Veeam API, could be related.
-
- Veeam Software
- Posts: 2010
- Liked: 670 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: authorization using the Authorization Code
Not sure about Squared Up API, never used it. I think it could be anything.
As for our issue, we confirmed it as a bug, and the plan is to fix it in vNext. Thanks!
As for our issue, we confirmed it as a bug, and the plan is to fix it in vNext. Thanks!
Who is online
Users browsing this forum: No registered users and 2 guests