Fill these in once
- Ask the GitHub API about a user
curl -s https://api.github.com/users/octocatThe answer comes back as JSON: labelled data about that account.
Check it worked
- Send your API key with the request
curl -s -H "Authorization: Bearer $API_KEY" https://api.github.com/userPut your key in the API_KEY environment variable first, never in the command itself.
- Ask the GitHub API about a user
curl -s https://api.github.com/users/octocatThe answer comes back as JSON: labelled data about that account.
Check it worked
- Send your API key with the request
curl -s -H "Authorization: Bearer $API_KEY" https://api.github.com/userPut your key in the API_KEY environment variable first, never in the command itself.
- Ask the GitHub API about a user
Invoke-RestMethod -Uri https://api.github.com/users/octocatPowerShell turns the JSON answer into a tidy list.
Check it worked
- Send your API key with the request
Invoke-RestMethod -Uri https://api.github.com/user -Headers @{ Authorization = "Bearer $env:API_KEY" }Put your key in the API_KEY environment variable first, never in the command itself.

New to API? I explain it in plain English on Layman Terms.