Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 1, 2017. It is now read-only.

Commit84acb8e

Browse files
committed
Merge pull request#456 from github/update-1421152168
2 parents8e01112 +f67137b commit84acb8e

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

‎content/guides/getting-started.md‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ Also, the [**Authorizations API**][authorizations api] makes it simple to use Ba
196196
to create an OAuth token. Try pasting and running the following command:
197197

198198
<preclass="terminal">
199-
$ curl -i -u&lt;your_username&gt; -d '{"scopes": ["repo"], "note": "getting-started"}' \
199+
$ curl -i -u&lt;your_username&gt; -d '{"scopes": ["repo", "user"], "note": "getting-started"}' \
200200
https://api.github.com/authorizations
201201

202202
HTTP/1.1 201 Created
@@ -205,7 +205,8 @@ Content-Length: 384
205205

206206
{
207207
"scopes": [
208-
"repo"
208+
"repo",
209+
"user"
209210
],
210211
"token": "5199831f4dd3b79e7c5b7e0ebe75d67aa66e79d4",
211212
"updated_at": "2012-11-14T14:04:24Z",
@@ -230,7 +231,9 @@ Next, let's look at the `scopes` we're sending over in this call. When creating
230231
a new token, we include an optional array of[_scopes_][scopes], or access
231232
levels, that indicate what information this token can access. In this case,
232233
we're setting up the token with_repo_ access, which grants access to read and
233-
write to private repositories. See[the scopes docs][scopes] for a full list of
234+
write to public and private repositories, and_user_ scope, which grants read
235+
and write access to public and private user profile data. See
236+
[the scopes docs][scopes] for a full list of
234237
scopes. You should**only** request scopes that your application actually needs,
235238
in order to not frighten users with potentially invasive actions. The`201`
236239
status code tells us that the call was successful, and the JSON returned
@@ -243,7 +246,7 @@ in the [X-GitHub-OTP request header][2fa header]:
243246

244247
<preclass="terminal">
245248
$ curl -i -u&lt;your_username&gt; -H "X-GitHub-OTP:&lt;your_2fa_OTP_code&gt;" \
246-
-d '{"scopes": ["repo"], "note": "getting-started"}' \
249+
-d '{"scopes": ["repo", "user"], "note": "getting-started"}' \
247250
https://api.github.com/authorizations
248251
</pre>
249252

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp