February 2019
Intermediate to advanced
626 pages
15h 51m
English
Once an application is registered, an authorization code is required. Obtaining the authorization code gives the end user the opportunity to grant the application access to a GitHub account. If the user is not currently logged in to GitHub, it will also prompt him/her to log on.
A URL must be created that will prompt for authorization:
$authorize = 'https://github.com/login/oauth/authorize?client_id={0}&scope={1}' -f
$clientId,
'user:email'
The 'user:email' scope describes the rights the application would like to have. The web API guide contains a list of possible scopes: https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/.
Read now
Unlock full access