JSON Web Token

PHOTO EMBED

Wed Jan 26 2022 02:27:03 GMT+0000 (Coordinated Universal Time)

Saved by @joeclaap #javascript #json #auth #fetch

const token = 'YOUR_TOKEN_HERE';
fetch('https://api.github.com/user/repos', {
  headers: {
    Authorization: `token ${token}`
  }
})
  .then(res => res.json())
  .then(json => console.log(json));
content_copyCOPY