Unexpected 401 when calling gitlab REST-api

Viewed 18

Currently i am selfhosting gitlab-ce (8.17) via. a docker container runnnig on localhost 127.0.0.1:8080. I want to make rest calls to the instance, but i am experiencing unfortunate 401 responses using postman.

{"message": "401 Unauthorized"}

when calling 127.0.0.1:8080/api/v3/projects. Right now you are perhaps thinking that i need to deploy access-tokens to postman - but I have currently tried all the different ways to authorize my postman with tokens generated from the admin account on the local gitlab instance. I have tried to traverse google for something like this, but with little result!

An example:

I have generated the following token: qPGR1GXfjMYYRs6od6DJ within both the api and read_user scope, yet, when I add this token as a bearer token in postman I am getting the 401 response.

Another wierd detail is that i can make the api call I want through the browser, no problem.

Thanks in advance!

0 Answers
Related