How do I retrieve a working Gitlab API access token given an OAuth application. Currently I get "401 Unauthorized"

Viewed 40

I have created a Gitlab application (under User Settings / Applications). I have the client Id and secret and am successfully fetching a token using:

POST https://gitlab.com/oauth/token?grant_type=client_credentials&client_id=<id>&client_secret=<secret> .

When using the token I receive on any API call I try, the response is {"message": "401 Unauthorized"} . (I have given the application permissions on everything, when testing).

The same API calls work with personal access tokens.

What am I doing wrong?

0 Answers
Related