REST API knowledge exchange
Post Reply
Daniel N.
Enthusiast
Posts: 52
Liked: 5 times
Joined: Feb 15, 2015 7:03 am
Contact:

Unauthorized?

Post by Daniel N. »

I'm using Swagger to evaluate the API. I followed the documentation and authorized myself with the same username and password I use to access the console. My user account has the Veeam Backup Administrator role.

Image

I am unable to access the inventory browser. Any response is met with a 401 Unauthorized.

Image

Why?
ronnmartin61
Veeam Software
Posts: 540
Liked: 193 times
Joined: Mar 07, 2016 3:55 pm
Full Name: Ronn Martin
Contact:

Re: Unauthorized?

Post by ronnmartin61 »

The authorization dialog seems to be happy to take information that isn't quite syntactically correct. For instance if I submit Bearer "my access code" (with double quotes around the access code it doesn't yield any exception even though this throws off the curl commands by inserting extraneous quotations. You can check to see if you're really good by posting a logoff and if it returns 200 then you know everything is acceptable with the way you're entering the bearer token.
Authorization should look like - https://www.dropbox.com/s/qxrwr2ie4pdqj ... I.PNG?dl=0
Daniel N.
Enthusiast
Posts: 52
Liked: 5 times
Joined: Feb 15, 2015 7:03 am
Contact:

Re: Unauthorized?

Post by Daniel N. »

The logout returns 200 no matter what you pass as an Authorize header.

But I figured it out. When using the Authorize button, you not only have to enter the token, but

Code: Select all

Bearer Authtoken
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests