'Gitlab API not being able to view project variables

I am using postman to GET the project based on projectID. Which works.

https://gitlab.example.com/api/v4/projects/1/

I have some variables within that project that I would like to GET using

https://gitlab.example.com/api/v4/projects/1/variables

{
    "message": "401 Unauthorized"
}

I might need to change some settings within Gitlab, but don't know where to go since I thought I added the variables I would be authorized to GET the variables.

Edit: I have a API token that I am using.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source