Skip to content
Discussion options

You must be logged in to vote

but what about receiving it through python? Is it possible?

  • I think so, replace the placeholder <YOUR TOKEN HERE> with your token
# example of what the token should look like; this token won't work, it's a random string I made up
headers = {"Authorization": "Bearer ghp_vywuaDBnDpoKT77gmftPfU8JtNoyzZFC4xW1L"}
import requests

url = 'https://api.github.com/graphql'
headers = {"Authorization": "<YOUR TOKEN HERE>"}

query = """
query {
  user(login: "ashtom") {
    status {
      message
      emoji
      indicatesLimitedAvailability
    }
  }
}
"""

request = requests.post(url, json={'query': query}, headers=headers)
if request.status_code == 200:
    result = request.json()
    print(re…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@ghost
Comment options

@ghost
Comment options

@LangLangBart
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Apps API and Webhooks Discussions related to GitHub's APIs or Webhooks Question Ask and answer questions about GitHub features and usage
1 participant