GithubはAPIのセキュリティ強化のために、クエリパラメータとOAuthアプリケーションAPIによるAPI 認証が廃止されます。
【廃止日時】
- クエリ パラメーター:2021 年 9 月 8 日 14:00 UTC
- OAuth アプリケーション API:2021 年 8 月 11 日 14:00 UTC
クエリパラメータで現在以下のような API 呼び出しを行っている場合は
curl "https://api.github.com/user/repos?access_token=my_access_token"
代わりに、以下のようにヘッダーでトークンを送信する必要があります。
curl -H 'Authorization: token my_access_token' https://api.github.com/user/repos
OAuth APIで現在以下のような呼び出しを行っている場合は
curl -u my_client_id:my_client_secret -X POST "https://api.github.com/applications/123/tokens/my_access_token"
代わりに、以下のようにrequestのbodyで指定する必要があります。
curl -u my_client_id:my_client_secret -X PATCH "https://api.github.com/applications/123/token -d {"access_token": "my_access_token"}"
Sunsetting API Authentication via Query Parameters, and the OAuth Applications API
Sunsetting API Authentication via Query Parameters, and the OAuth Applications API