List Sponsor Subscriptions

HI all I am trying to build a Node.js script that takes a GitHub Personal Access Token (PAT) via environment variable and fetches the sponsor subscriptions (i.e. who and what - tier - they are sponsoring) for the access token owner. I am fine with either using the GraphQL or REST API.

Is it even possible to get info of the PAT without providing a username?

Basically I am struggling to figure out how to implement the following: given a PAT get the owner information.

Thank you in advance for your help!

I figured it out! I was looking for viewer . Here is a sample query:

viewer {