Getting 401 for external_status_checks api

Hello everyone, I am following the gitlab documentation to fetch external_status_checks for my project using my personal access token. But I’m not sure why, I’m getting 401 {“message”: “401 Unauthorized”}. I am able to fetch project with /project/:id so the issue does not appear to be with token. I have given complete api access for the token. Also I am not getting option to add status checks in merge request section in settings for the project