If you have a given token from GitHub and you want to know which scopes it has you have to check the Headers. Just use the token for any resource on the GitHub API and double check the headers of the response. In the headers the “x-oauth-scopes” field tells you the which scopes the token has.
Here is a small example with Ruby and HTTParty.
response = HTTParty.get("https://api.github.com/user?access_token=#{token}", :headers => {"User-Agent" => A_USER_AGENT } ) response.headers['x-oauth-scopes']
If you HTTParty, party hard! 😉