Next: , Previous: , Up: GitHub API Authentication   [Index]

1.1.2 GitHub API Authentication—Personal Access Tokens

You can create a new Personal Access Token at:

Fill in the form and then move to the next screen, which will show you the token. Copy it somewhere safe; you will never be able to see it again.

You can now use the token from the command line with curl:

curl --header "Authorization: token d64761df071c2bf517ceb063b279432ed2f89c62" \

Or with fetch in a browser or node-fetch in Node.js:

const response = await fetch(
    headers: {
      authorization: "token d64761df071c2bf517ceb063b279432ed2f89c62"
console.log(await response.json());