I’ve created an OAuth Application, and have authenticated it on my user, and have gotten an Access Token. I’ve followed these docs.
Now, if you take a look at the API docs, you’d see that OAuth2 tokens can be used either via query param, or via Authorization header as Bearer token.
However, when I make the following call
curl --header "Authorization: Bearer <OAUTH-TOKEN>" "https://gitlab.com/api/v4/user", I get back 401, same as I would if I didn’t pass any token.
But if I pass the token via query param,
curl "https://gitlab.com/api/v4/user?access_token=<OAUTH-TOKEN>", then it works.
Why would the Bearer token not work for the API, while the query param works as intended?