The error should be caused by you using the client credential flow. You are calling the /me
endpoint, so you should use the delegated authentication flow with user login to obtain the token. For example, auth code flow or ROPC flow.
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.