1.通过以下post请求获取device_code和user_code curl --location 'https://github.com/login/device/code' --header 'Accept: application/json' --header 'Content-Type: application/json' --data '{ "client_id": "Iv1.b507a08c87ecfe98", "scope": "read:user" }' 2.去https://github.com/login/device用刚才返回的user_code激活 3.然后使用post请求如下: curl --location 'https://github.com/login/oauth/access_token' --header 'accept: application/json' --header 'content-type: application/json' --data '{ "client_id": "Iv1.b507a08c87ecfe98", "device_code": "刚才返回的devicecode", "grant_type": "urn:ietf:params:oauth:grant-type:device_code" }' 发出post请求后,你会得到ghu
@conan2 #8 客服说我权限被限制了
接口还能用啊
@songshi #1 怎么导出apikey现在
你用jb家的github copilot插件,验证后
mac默认是在.config/github-copilot/hosts.json
学习一下
1.通过以下post请求获取device_code和user_code
curl --location 'https://github.com/login/device/code'
--header 'Accept: application/json'
--header 'Content-Type: application/json'
--data '{
"client_id": "Iv1.b507a08c87ecfe98",
"scope": "read:user"
}'
2.去https://github.com/login/device用刚才返回的user_code激活
3.然后使用post请求如下:
curl --location 'https://github.com/login/oauth/access_token'
--header 'accept: application/json'
--header 'content-type: application/json'
--data '{
"client_id": "Iv1.b507a08c87ecfe98",
"device_code": "刚才返回的devicecode",
"grant_type": "urn:ietf:params:oauth:grant-type:device_code"
}'
发出post请求后,你会得到ghu
@conan2 #5 大佬能不能截个图或者录个屏
@schau #6 就用你windows的cmd或者mac的terminal,照着输入就行。记得改变量为第一次返回对应的那些值
@schau #6 1就照着post,然后就能看到返回8位验证码,拿着那个8位码去网页绑定。绑定完后把3的设备码改成1返回的值,接着post,就会返回你的ghu