Call to check if user has access is returning a 404 error

I am currently trying to make a call to
https://{baseUrl}.atlassian.net/wiki/rest/api/content/{contentId}/restriction/byOperation/read/user?key={userKey}

I have verified that the contentId and userkey are correct and that the specified user has access to view and update the specified page, but I am still getting a 404. Is there something that I am missing. This call is being made after an OAuth 2.0o bearer token has been obtained (not usre if that matters)

Are you doing this within a Connect app you’re building?

Yes it is a Connect App

Sorry my account was put on a temporary hold so I’m not sure you got my last response, but yes it is a connect app

Does the OAuth 2 user that you are acting on behalf of have access to that page? Is that user different than the user key that you’re passing in.

From the Reference docs you get a 404 for the following reasons:

404 Not Found
Returned if;

  • There is no content with the given ID.
  • The calling user does not have permission to view the content.
  • An invalid operation or user is specified.