@@ -192,6 +192,7 @@ can specify multiple scopes by separating them with a comma:
192192 scope=user,public_repo
193193
194194## Common errors for the authorization request
195+ <<<<<<< HEAD
195196
196197There are a few things that can go wrong in the process of obtaining an
197198OAuth token for a user. In the initial authorization request phase,
@@ -260,6 +261,106 @@ match what you received in the first request for authorization you will
260261receive this error.
261262
262263<%= json : error => : bad_verification_code %>
264+ =======
265+
266+ There are a few things that can go wrong in the process of obtaining an
267+ OAuth token for a user. In the initial authorization request phase,
268+ these are some errors you might see:
269+
270+ ### Application Suspended
271+
272+ If the OAuth application you set up has been suspended (due to reported
273+ abuse, spam, or a mis-use of the API), GitHub will redirect to the
274+ registered callback URL with the following parameters summerizing the
275+ error:
276+
277+ http://your-application.com/callback?error=application_suspended
278+ &error_description=Your+application+has+been+suspended.+Contact+support@github.com.
279+ &error_uri=http://developer.github.com/v3/oauth/%23application-suspended
280+ &state=xyz
281+
282+ Please contact [ support] ( https://github.com/contact ) to solve issues
283+ with suspended applications.
284+
285+ ### Redirect URI mismatch
286+
287+ If you provide a redirect_uri that doesn't match what you've registered
288+ with your application, GitHub will redirect to the registered callback
289+ URL with the following parameters summerizing the error:
290+
291+ http://your-application.com/callback?error=redirect_uri_mismatch
292+ &error_description=The+redirect_uri+MUST+match+the+registered+callback+URL+for+this+application.
293+ &error_uri=http://developer.github.com/v3/oauth/%23redirect-uri-mismatch
294+ &state=xyz
295+
296+ To correct this error, either provide a redirect_uri that matches what
297+ you registered or leave out this parameter to use the default one
298+ registered with your application.
299+
300+ ### Access denied
301+
302+ If the user rejects access to your application, GItHub will redirect to
303+ the registered callback URL with the following parameters summerizing
304+ the error:
305+
306+ http://your-application.com/callback?error=access_denied
307+ &error_description=The+user+has+denied+your+application+access.
308+ &error_uri=http://developer.github.com/v3/oauth/%23access-denied
309+ &state=xyz
310+
311+ There's nothing you can do here as users are free to choose not to use
312+ your application. More often that not, users will just close the window
313+ or press back in their browser, so it is likely that you'll never see
314+ this error.
315+
316+ ## Common errors for the access token request
317+
318+ In the second phase of exchanging a code for an access token, there are
319+ an additional set of errors that can occur. The format of these
320+ responses is determined by the accept header you pass. The following
321+ examples only show JSON responses.
322+
323+ ### Incorrect client credentials
324+
325+ If the client\_ id and or client\_ secret you pass are incorrect you will
326+ receive this error response.
327+
328+ <%= json : error => : incorrect_client_credentials ,
329+ : error_description => "The client_id and/or client_secret passed are incorrect.",
330+ : error_uri => "http://developer.github.com/v3/oauth/#incorrect-client-credentials "
331+ %>
332+
333+ To solve this error, go back and make sure you have the correct
334+ credentials for your oauth application. Double check the ` client_id ` and
335+ ` client_secret ` to make sure they are correct and being passed correctly
336+ to GitHub.
337+
338+ ### Redirect URI mismatch(2)
339+
340+ If you provide a redirect_uri that doesn't match what you've registered
341+ with your application, you will receive this error message:
342+
343+ <%= json : error => : redirect_uri_mismatch ,
344+ : error_description => "The redirect_uri MUST match the registered callback URL for this application.",
345+ : error_uri => "http://developer.github.com/v3/oauth/#redirect-uri-mismatch(2) "
346+ %>
347+
348+ To correct this error, either provide a redirect_uri that matches what
349+ you registered or leave out this parameter to use the default one
350+ registered with your application.
351+
352+ ### Bad verification code
353+
354+ If the verification code you pass is incorrect, expired, or doesn't
355+ match what you received in the first request for authorization you will
356+ receive this error.
357+
358+ <%= json : error => : bad_verification_code ,
359+ : error_description => "The code passed is incorrect or expired.",
360+ : error_uri => "http://developer.github.com/v3/oauth/#bad-verification-code "
361+ %>
362+
363+ >>>>>>> master
263364
264365To solve this error, start the [ OAuth process over from the beginning] ( #redirect-users-to-request-github-access )
265366and get a new code.
0 commit comments