{"action":"created","comment":{"url":"https://api.github.com/repos/aetrion/dnsimple-developer/pulls/comments/48714147","id":48714147,"diff_hunk":"@@ -16,15 +16,63 @@ Developers need to register their application before getting started. A register\n \n ## Web Application Flow\n \n-This is a description of the OAuth 2 flow for authorizing users from 3rd party web sites. The OAuth 2 specification is described in the [RFC6749](http://tools.ietf.org/html/rfc6749#section-4.1).\n+This is a description of the OAuth 2 flow for authorizing users from 3rd party web sites. The OAuth 2 specification is described in the [RFC 6749](http://tools.ietf.org/html/rfc6749#section-4).\n+\n+<info>\n+The API currently supports only the OAuth 2 [Authorization Code Grant](http://tools.ietf.org/html/rfc6749#section-4.1) flow. Therefore, [the only supported value for the `response_type` is `code`](http://tools.ietf.org/html/rfc6749#section-3.1.1).\n+</info>\n \n ### Step 1 - Authorization\n \n+This starts the OAuth 2.0 authorization flow. This isn't an API call — it's the web page that lets the user sign in to DNSimple and authorize your app. After the user decides whether or not to authorize your app, they will be redirected to the URI specified by `redirect_uri`.\n+\n+Your web or mobile app should redirect users to the following URL:\n+\n+~~~\n+GET https://dnsimple.com/oauth/authorize\n+~~~\n+\n+The following values should be passed as GET parameters:\n+\n+`response_type` | **Required**. The grant type requested. We currently only support `code`.\n+`client_id`     | **Required**. The client ID you received from DNSimple when you registered the application.\n+`redirect_uri`  | Where to redirect the user after authorization has completed. This must be the exact URI registered or a subdirectory.","path":"content/v2/oauth.markdown","position":25,"original_position":25,"commit_id":"83821b9e0f1118ca9342b2c908ddfd6240cb5339","original_commit_id":"83821b9e0f1118ca9342b2c908ddfd6240cb5339","user":{"login":"jacegu","id":381143,"avatar_url":"https://avatars.githubusercontent.com/u/381143?v=3","gravatar_id":"","url":"https://api.github.com/users/jacegu","html_url":"https://github.com/jacegu","followers_url":"https://api.github.com/users/jacegu/followers","following_url":"https://api.github.com/users/jacegu/following{/other_user}","gists_url":"https://api.github.com/users/jacegu/gists{/gist_id}","starred_url":"https://api.github.com/users/jacegu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacegu/subscriptions","organizations_url":"https://api.github.com/users/jacegu/orgs","repos_url":"https://api.github.com/users/jacegu/repos","events_url":"https://api.github.com/users/jacegu/events{/privacy}","received_events_url":"https://api.github.com/users/jacegu/received_events","type":"User","site_admin":false},"body":"I think this needs further clarification:\r\n\r\n> This must be the exact URI registered **as callback** or a subdirectory.\r\n\r\nI'm also not sure _subdirectory_ is the correct term here but can't think of anything better right now.","created_at":"2016-01-04T09:23:14Z","updated_at":"2016-01-04T09:23:14Z","html_url":"https://github.com/aetrion/dnsimple-developer/pull/48#discussion_r48714147","pull_request_url":"https://api.github.com/repos/aetrion/dnsimple-developer/pulls/48","_links":{"self":{"href":"https://api.github.com/repos/aetrion/dnsimple-developer/pulls/comments/48714147"},"html":{"href":"https://github.com/aetrion/dnsimple-developer/pull/48#discussion_r48714147"},"pull_request":{"href":"https://api.github.com/repos/aetrion/dnsimple-developer/pulls/48"}}},"pull_request":{"url":"https://api.github.com/repos/aetrion/dnsimple-developer/pulls/48","id":54867512,"html_url":"https://github.com/aetrion/dnsimple-developer/pull/48","diff_url":"https://github.com/aetrion/dnsimple-developer/pull/48.diff","patch_url":"https://github.com/aetrion/dnsimple-developer/pull/48.patch","issue_url":"https://api.github.com/repos/aetrion/dnsimple-developer/issues/48","number":48,"state":"open","locked":false,"title":"Document OAuth 2 for API v2","user":{"login":"weppos","id":5387,"avatar_url":"https://avatars.githubusercontent.com/u/5387?v=3","gravatar_id":"","url":"https://api.github.com/users/weppos","html_url":"https://github.com/weppos","followers_url":"https://api.github.com/users/weppos/followers","following_url":"https://api.github.com/users/weppos/following{/other_user}","gists_url":"https://api.github.com/users/weppos/gists{/gist_id}","starred_url":"https://api.github.com/users/weppos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weppos/subscriptions","organizations_url":"https://api.github.com/users/weppos/orgs","repos_url":"https://api.github.com/users/weppos/repos","events_url":"https://api.github.com/users/weppos/events{/privacy}","received_events_url":"https://api.github.com/users/weppos/received_events","type":"User","site_admin":false},"body":"This PR documents the web application flow.","created_at":"2015-12-31T15:14:28Z","updated_at":"2016-01-04T09:23:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"15e3764fd97f8f49d41efc8c09e92fb25918ccad","assignee":{"login":"weppos","id":5387,"avatar_url":"https://avatars.githubusercontent.com/u/5387?v=3","gravatar_id":"","url":"https://api.github.com/users/weppos","html_url":"https://github.com/weppos","followers_url":"https://api.github.com/users/weppos/followers","following_url":"https://api.github.com/users/weppos/following{/other_user}","gists_url":"https://api.github.com/users/weppos/gists{/gist_id}","starred_url":"https://api.github.com/users/weppos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weppos/subscriptions","organizations_url":"https://api.github.com/users/weppos/orgs","repos_url":"https://api.github.com/users/weppos/repos","events_url":"https://api.github.com/users/weppos/events{/privacy}","received_events_url":"https://api.github.com/users/weppos/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/aetrion/dnsimple-developer/pulls/48/commits","review_comments_url":"https://api.github.com/repos/aetrion/dnsimple-developer/pulls/48/comments","review_comment_url":"https://api.github.com/repos/aetrion/dnsimple-developer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aetrion/dnsimple-developer/issues/48/comments","statuses_url":"https://api.github.com/repos/aetrion/dnsimple-developer/statuses/83821b9e0f1118ca9342b2c908ddfd6240cb5339","head":{"label":"aetrion:v2-oauth","ref":"v2-oauth","sha":"83821b9e0f1118ca9342b2c908ddfd6240cb5339","user":{"login":"aetrion","id":323774,"avatar_url":"https://avatars.githubusercontent.com/u/323774?v=3","gravatar_id":"","url":"https://api.github.com/users/aetrion","html_url":"https://github.com/aetrion","followers_url":"https://api.github.com/users/aetrion/followers","following_url":"https://api.github.com/users/aetrion/following{/other_user}","gists_url":"https://api.github.com/users/aetrion/gists{/gist_id}","starred_url":"https://api.github.com/users/aetrion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aetrion/subscriptions","organizations_url":"https://api.github.com/users/aetrion/orgs","repos_url":"https://api.github.com/users/aetrion/repos","events_url":"https://api.github.com/users/aetrion/events{/privacy}","received_events_url":"https://api.github.com/users/aetrion/received_events","type":"Organization","site_admin":false},"repo":{"id":5965968,"name":"dnsimple-developer","full_name":"aetrion/dnsimple-developer","owner":{"login":"aetrion","id":323774,"avatar_url":"https://avatars.githubusercontent.com/u/323774?v=3","gravatar_id":"","url":"https://api.github.com/users/aetrion","html_url":"https://github.com/aetrion","followers_url":"https://api.github.com/users/aetrion/followers","following_url":"https://api.github.com/users/aetrion/following{/other_user}","gists_url":"https://api.github.com/users/aetrion/gists{/gist_id}","starred_url":"https://api.github.com/users/aetrion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aetrion/subscriptions","organizations_url":"https://api.github.com/users/aetrion/orgs","repos_url":"https://api.github.com/users/aetrion/repos","events_url":"https://api.github.com/users/aetrion/events{/privacy}","received_events_url":"https://api.github.com/users/aetrion/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aetrion/dnsimple-developer","description":"The DNSimple API Documentation.","fork":false,"url":"https://api.github.com/repos/aetrion/dnsimple-developer","forks_url":"https://api.github.com/repos/aetrion/dnsimple-developer/forks","keys_url":"https://api.github.com/repos/aetrion/dnsimple-developer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aetrion/dnsimple-developer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aetrion/dnsimple-developer/teams","hooks_url":"https://api.github.com/repos/aetrion/dnsimple-developer/hooks","issue_events_url":"https://api.github.com/repos/aetrion/dnsimple-developer/issues/events{/number}","events_url":"https://api.github.com/repos/aetrion/dnsimple-developer/events","assignees_url":"https://api.github.com/repos/aetrion/dnsimple-developer/assignees{/user}","branches_url":"https://api.github.com/repos/aetrion/dnsimple-developer/branches{/branch}","tags_url":"https://api.github.com/repos/aetrion/dnsimple-developer/tags","blobs_url":"https://api.github.com/repos/aetrion/dnsimple-developer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aetrion/dnsimple-developer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aetrion/dnsimple-developer/git/refs{/sha}","trees_url":"https://api.github.com/repos/aetrion/dnsimple-developer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aetrion/dnsimple-developer/statuses/{sha}","languages_url":"https://api.github.com/repos/aetrion/dnsimple-developer/languages","stargazers_url":"https://api.github.com/repos/aetrion/dnsimple-developer/stargazers","contributors_url":"https://api.github.com/repos/aetrion/dnsimple-developer/contributors","subscribers_url":"https://api.github.com/repos/aetrion/dnsimple-developer/subscribers","subscription_url":"https://api.github.com/repos/aetrion/dnsimple-developer/subscription","commits_url":"https://api.github.com/repos/aetrion/dnsimple-developer/commits{/sha}","git_commits_url":"https://api.github.com/repos/aetrion/dnsimple-developer/git/commits{/sha}","comments_url":"https://api.github.com/repos/aetrion/dnsimple-developer/comments{/number}","issue_comment_url":"https://api.github.com/repos/aetrion/dnsimple-developer/issues/comments{/number}","contents_url":"https://api.github.com/repos/aetrion/dnsimple-developer/contents/{+path}","compare_url":"https://api.github.com/repos/aetrion/dnsimple-developer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aetrion/dnsimple-developer/merges","archive_url":"https://api.github.com/repos/aetrion/dnsimple-developer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aetrion/dnsimple-developer/downloads","issues_url":"https://api.github.com/repos/aetrion/dnsimple-developer/issues{/number}","pulls_url":"https://api.github.com/repos/aetrion/dnsimple-developer/pulls{/number}","milestones_url":"https://api.github.com/repos/aetrion/dnsimple-developer/milestones{/number}","notifications_url":"https://api.github.com/repos/aetrion/dnsimple-developer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aetrion/dnsimple-developer/labels{/name}","releases_url":"https://api.github.com/repos/aetrion/dnsimple-developer/releases{/id}","created_at":"2012-09-26T13:13:01Z","updated_at":"2015-10-19T02:07:58Z","pushed_at":"2015-12-31T15:40:58Z","git_url":"git://github.com/aetrion/dnsimple-developer.git","ssh_url":"git@github.com:aetrion/dnsimple-developer.git","clone_url":"https://github.com/aetrion/dnsimple-developer.git","svn_url":"https://github.com/aetrion/dnsimple-developer","homepage":"https://developer.dnsimple.com/","size":559,"stargazers_count":18,"watchers_count":18,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":5,"forks":17,"open_issues":5,"watchers":18,"default_branch":"master"}},"base":{"label":"aetrion:master","ref":"master","sha":"0e0ecf274471dd6945963194f0e4476f2df7b237","user":{"login":"aetrion","id":323774,"avatar_url":"https://avatars.githubusercontent.com/u/323774?v=3","gravatar_id":"","url":"https://api.github.com/users/aetrion","html_url":"https://github.com/aetrion","followers_url":"https://api.github.com/users/aetrion/followers","following_url":"https://api.github.com/users/aetrion/following{/other_user}","gists_url":"https://api.github.com/users/aetrion/gists{/gist_id}","starred_url":"https://api.github.com/users/aetrion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aetrion/subscriptions","organizations_url":"https://api.github.com/users/aetrion/orgs","repos_url":"https://api.github.com/users/aetrion/repos","events_url":"https://api.github.com/users/aetrion/events{/privacy}","received_events_url":"https://api.github.com/users/aetrion/received_events","type":"Organization","site_admin":false},"repo":{"id":5965968,"name":"dnsimple-developer","full_name":"aetrion/dnsimple-developer","owner":{"login":"aetrion","id":323774,"avatar_url":"https://avatars.githubusercontent.com/u/323774?v=3","gravatar_id":"","url":"https://api.github.com/users/aetrion","html_url":"https://github.com/aetrion","followers_url":"https://api.github.com/users/aetrion/followers","following_url":"https://api.github.com/users/aetrion/following{/other_user}","gists_url":"https://api.github.com/users/aetrion/gists{/gist_id}","starred_url":"https://api.github.com/users/aetrion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aetrion/subscriptions","organizations_url":"https://api.github.com/users/aetrion/orgs","repos_url":"https://api.github.com/users/aetrion/repos","events_url":"https://api.github.com/users/aetrion/events{/privacy}","received_events_url":"https://api.github.com/users/aetrion/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aetrion/dnsimple-developer","description":"The DNSimple API Documentation.","fork":false,"url":"https://api.github.com/repos/aetrion/dnsimple-developer","forks_url":"https://api.github.com/repos/aetrion/dnsimple-developer/forks","keys_url":"https://api.github.com/repos/aetrion/dnsimple-developer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aetrion/dnsimple-developer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aetrion/dnsimple-developer/teams","hooks_url":"https://api.github.com/repos/aetrion/dnsimple-developer/hooks","issue_events_url":"https://api.github.com/repos/aetrion/dnsimple-developer/issues/events{/number}","events_url":"https://api.github.com/repos/aetrion/dnsimple-developer/events","assignees_url":"https://api.github.com/repos/aetrion/dnsimple-developer/assignees{/user}","branches_url":"https://api.github.com/repos/aetrion/dnsimple-developer/branches{/branch}","tags_url":"https://api.github.com/repos/aetrion/dnsimple-developer/tags","blobs_url":"https://api.github.com/repos/aetrion/dnsimple-developer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aetrion/dnsimple-developer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aetrion/dnsimple-developer/git/refs{/sha}","trees_url":"https://api.github.com/repos/aetrion/dnsimple-developer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aetrion/dnsimple-developer/statuses/{sha}","languages_url":"https://api.github.com/repos/aetrion/dnsimple-developer/languages","stargazers_url":"https://api.github.com/repos/aetrion/dnsimple-developer/stargazers","contributors_url":"https://api.github.com/repos/aetrion/dnsimple-developer/contributors","subscribers_url":"https://api.github.com/repos/aetrion/dnsimple-developer/subscribers","subscription_url":"https://api.github.com/repos/aetrion/dnsimple-developer/subscription","commits_url":"https://api.github.com/repos/aetrion/dnsimple-developer/commits{/sha}","git_commits_url":"https://api.github.com/repos/aetrion/dnsimple-developer/git/commits{/sha}","comments_url":"https://api.github.com/repos/aetrion/dnsimple-developer/comments{/number}","issue_comment_url":"https://api.github.com/repos/aetrion/dnsimple-developer/issues/comments{/number}","contents_url":"https://api.github.com/repos/aetrion/dnsimple-developer/contents/{+path}","compare_url":"https://api.github.com/repos/aetrion/dnsimple-developer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aetrion/dnsimple-developer/merges","archive_url":"https://api.github.com/repos/aetrion/dnsimple-developer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aetrion/dnsimple-developer/downloads","issues_url":"https://api.github.com/repos/aetrion/dnsimple-developer/issues{/number}","pulls_url":"https://api.github.com/repos/aetrion/dnsimple-developer/pulls{/number}","milestones_url":"https://api.github.com/repos/aetrion/dnsimple-developer/milestones{/number}","notifications_url":"https://api.github.com/repos/aetrion/dnsimple-developer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aetrion/dnsimple-developer/labels{/name}","releases_url":"https://api.github.com/repos/aetrion/dnsimple-developer/releases{/id}","created_at":"2012-09-26T13:13:01Z","updated_at":"2015-10-19T02:07:58Z","pushed_at":"2015-12-31T15:40:58Z","git_url":"git://github.com/aetrion/dnsimple-developer.git","ssh_url":"git@github.com:aetrion/dnsimple-developer.git","clone_url":"https://github.com/aetrion/dnsimple-developer.git","svn_url":"https://github.com/aetrion/dnsimple-developer","homepage":"https://developer.dnsimple.com/","size":559,"stargazers_count":18,"watchers_count":18,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":5,"forks":17,"open_issues":5,"watchers":18,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/aetrion/dnsimple-developer/pulls/48"},"html":{"href":"https://github.com/aetrion/dnsimple-developer/pull/48"},"issue":{"href":"https://api.github.com/repos/aetrion/dnsimple-developer/issues/48"},"comments":{"href":"https://api.github.com/repos/aetrion/dnsimple-developer/issues/48/comments"},"review_comments":{"href":"https://api.github.com/repos/aetrion/dnsimple-developer/pulls/48/comments"},"review_comment":{"href":"https://api.github.com/repos/aetrion/dnsimple-developer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aetrion/dnsimple-developer/pulls/48/commits"},"statuses":{"href":"https://api.github.com/repos/aetrion/dnsimple-developer/statuses/83821b9e0f1118ca9342b2c908ddfd6240cb5339"}}}}