docs
docs copied to clipboard
Delete mentions of `X-GitHub-OTP` from the docs
See here for the final decision: https://github.com/github/docs/issues/31660#issuecomment-1960457785
Code of Conduct
- [X] I have read and agree to the GitHub Docs project's Code of Conduct
What article on docs.github.com is affected?
Probably docs/content/rest/authentication/authenticating-to-the-rest-api.md given that it documents X-GitHub-SSO and my guess is that X-GitHub-OTP and X-GitHub-SSO are related.
But, I don't know, since I don't know what it is or does.
What part(s) of the article would you like to see updated?
At least a sentence, but up to a whole article explaining what it is/does/how to use it.
Additional information
It's mentioned twice: https://github.com/search?q=repo%3Agithub%2Fdocs%20GitHub-OTP&type=code and every api response from GitHub includes a reference to it:
access-control-expose-headers: ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset
For comparison, https://github.com/github/docs/blob/4f40b22909f8192b70b557ee69fb46ceedb43b89/content/rest/authentication/authenticating-to-the-rest-api.md?plain=1#L54
If you receive a
403 Forbiddenerror, you can follow the URL in theX-GitHub-SSOheader to authorize your token. The URL expires after one hour. If you requested data that could come from multiple organizations, the API will not return results from the organizations that require SAML SSO. TheX-GitHub-SSOheader will indicate the ID of the organizations that require SAML SSO authorization of your {% data variables.product.pat_v1 %}. For example:X-GitHub-SSO: partial-results; organizations=21955855,20582480.
@jsoref Thanks for opening this issue! I'll get this triaged for review ✨
Thanks for opening an issue! We've triaged this issue for technical review by a subject matter expert :eyes:
(Internal note: asked here)
This header is no longer supported, and any mentions of it can be deleted from the docs. You or anyone else is welcome to make these updates.
@skedwards88 so, I just tested the example command:
gh api \
--header 'Accept: application/vnd.github+json' \
--method GET /repos/octocat/Spoon-Knife/issues \
-F per_page=2 --include
HTTP/2.0 200 OK
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset
Cache-Control: private, max-age=60, s-maxage=60
Content-Security-Policy: default-src 'none'
Content-Type: application/json; charset=utf-8
Date: Fri, 23 Feb 2024 03:08:29 GMT
Etag: W/"84f02fc5c7e15588e6f13bcec3fed654dd885db1fc47a8bd1c7b7866634984ea"
Link: <https://api.github.com/repositories/1300192/issues?per_page=2&page=2>; rel="next", <https://api.github.com/repositories/1300192/issues?per_page=2&page=8545>; rel="last"
Referrer-Policy: origin-when-cross-origin, strict-origin-when-cross-origin
Server: GitHub.com
Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
Vary: Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With
X-Accepted-Oauth-Scopes: repo
X-Content-Type-Options: nosniff
X-Frame-Options: deny
X-Github-Api-Version-Selected: 2022-11-28
X-Github-Media-Type: github.v3; format=json
X-Github-Request-Id: F72E:4A79:198A40D:32B351F:65D80C2D
X-Oauth-Client-Id: 178c6fc778ccc68e1d6a
X-Oauth-Scopes: gist, read:org, repo
X-Ratelimit-Limit: 5000
X-Ratelimit-Remaining: 4999
X-Ratelimit-Reset: 1708661309
X-Ratelimit-Resource: core
X-Ratelimit-Used: 1
X-Xss-Protection: 0
[
{
"url": "https://api.github.com/repos/octocat/Spoon-Knife/issues/32376",
"repository_url": "https://api.github.com/repos/octocat/Spoon-Knife",
"labels_url": "https://api.github.com/repos/octocat/Spoon-Knife/issues/32376/labels{/name}",
"comments_url": "https://api.github.com/repos/octocat/Spoon-Knife/issues/32376/comments",
"events_url": "https://api.github.com/repos/octocat/Spoon-Knife/issues/32376/events",
"html_url": "https://github.com/octocat/Spoon-Knife/pull/32376",
"id": 2150075499,
"node_id": "PR_kwDOABPW4M5ns4wE",
"number": 32376,
"title": "ADDED A BUTTON TO THE HTML AND CHANGED THE TEXT",
"user": {
"login": "ArnavChalla",
"id": 137600072,
"node_id": "U_kgDOCDOcSA",
"avatar_url": "https://avatars.githubusercontent.com/u/137600072?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ArnavChalla",
"html_url": "https://github.com/ArnavChalla",
"followers_url": "https://api.github.com/users/ArnavChalla/followers",
"following_url": "https://api.github.com/users/ArnavChalla/following{/other_user}",
"gists_url": "https://api.github.com/users/ArnavChalla/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ArnavChalla/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ArnavChalla/subscriptions",
"organizations_url": "https://api.github.com/users/ArnavChalla/orgs",
"repos_url": "https://api.github.com/users/ArnavChalla/repos",
"events_url": "https://api.github.com/users/ArnavChalla/events{/privacy}",
"received_events_url": "https://api.github.com/users/ArnavChalla/received_events",
"type": "User",
"site_admin": false
},
"labels": [],
"state": "open",
"locked": false,
"assignee": null,
"assignees": [],
"milestone": null,
"comments": 0,
"created_at": "2024-02-22T22:50:26Z",
"updated_at": "2024-02-22T22:50:26Z",
"closed_at": null,
"author_association": "NONE",
"active_lock_reason": null,
"draft": false,
"pull_request": {
"url": "https://api.github.com/repos/octocat/Spoon-Knife/pulls/32376",
"html_url": "https://github.com/octocat/Spoon-Knife/pull/32376",
"diff_url": "https://github.com/octocat/Spoon-Knife/pull/32376.diff",
"patch_url": "https://github.com/octocat/Spoon-Knife/pull/32376.patch",
"merged_at": null
},
"body": "Changed README slightly and alsi changed the index.html file to add a cool button.",
"reactions": {
"url": "https://api.github.com/repos/octocat/Spoon-Knife/issues/32376/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
},
"timeline_url": "https://api.github.com/repos/octocat/Spoon-Knife/issues/32376/timeline",
"performed_via_github_app": null,
"state_reason": null
},
{
"url": "https://api.github.com/repos/octocat/Spoon-Knife/issues/32374",
"repository_url": "https://api.github.com/repos/octocat/Spoon-Knife",
"labels_url": "https://api.github.com/repos/octocat/Spoon-Knife/issues/32374/labels{/name}",
"comments_url": "https://api.github.com/repos/octocat/Spoon-Knife/issues/32374/comments",
"events_url": "https://api.github.com/repos/octocat/Spoon-Knife/issues/32374/events",
"html_url": "https://github.com/octocat/Spoon-Knife/pull/32374",
"id": 2149798429,
"node_id": "PR_kwDOABPW4M5nr8MP",
"number": 32374,
"title": "Completed SE lab assignment",
"user": {
"login": "abhinaytn",
"id": 138466563,
"node_id": "U_kgDOCEDVAw",
"avatar_url": "https://avatars.githubusercontent.com/u/138466563?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/abhinaytn",
"html_url": "https://github.com/abhinaytn",
"followers_url": "https://api.github.com/users/abhinaytn/followers",
"following_url": "https://api.github.com/users/abhinaytn/following{/other_user}",
"gists_url": "https://api.github.com/users/abhinaytn/gists{/gist_id}",
"starred_url": "https://api.github.com/users/abhinaytn/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/abhinaytn/subscriptions",
"organizations_url": "https://api.github.com/users/abhinaytn/orgs",
"repos_url": "https://api.github.com/users/abhinaytn/repos",
"events_url": "https://api.github.com/users/abhinaytn/events{/privacy}",
"received_events_url": "https://api.github.com/users/abhinaytn/received_events",
"type": "User",
"site_admin": false
},
"labels": [],
"state": "open",
"locked": false,
"assignee": null,
"assignees": [],
"milestone": null,
"comments": 0,
"created_at": "2024-02-22T19:32:44Z",
"updated_at": "2024-02-22T19:32:44Z",
"closed_at": null,
"author_association": "NONE",
"active_lock_reason": null,
"draft": false,
"pull_request": {
"url": "https://api.github.com/repos/octocat/Spoon-Knife/pulls/32374",
"html_url": "https://github.com/octocat/Spoon-Knife/pull/32374",
"diff_url": "https://github.com/octocat/Spoon-Knife/pull/32374.diff",
"patch_url": "https://github.com/octocat/Spoon-Knife/pull/32374.patch",
"merged_at": null
},
"body": null,
"reactions": {
"url": "https://api.github.com/repos/octocat/Spoon-Knife/issues/32374/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
},
"timeline_url": "https://api.github.com/repos/octocat/Spoon-Knife/issues/32374/timeline",
"performed_via_github_app": null,
"state_reason": null
}
]
The X-GitHub-OTP value is still being sent by GitHub. If it isn't supported, then I think you'll need to open a ticket against the github server team to have them remove the value first. And then once it's removed, I can see about removing it from the docs.
Emeğinize sağlık
Remove all
https://github.com/github/docs/pull/32412
I have removed the occurrences of this header from the content docs mentioned in case the support ticket was created and completed, as I am an external contributor to this project/org.