且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在Postman中使用GitHub API

更新时间:2023-01-19 20:14:35

使用标头方法,您应该可以将授权:令牌OAUTH-TOKEN直接放入标题部分下的键输入中。

Using the header method, you should be able to put "Authorization: token OAUTH-TOKEN" directly into the key input under the Headers section.

显然用您的实际令牌替换OAUTH-TOKEN。

Obviously replace OAUTH-TOKEN with your actual token.

编辑:以上是正确的,但我发现它并不明显。该图显示了要执行的操作,(a)在关键字段中,输入授权,(b)在值字段中,输入令牌。

The above is correct, but I found it non obvious. The image shows what to do, (a) in the key field, put in 'Authorization', (b) in the value field, put in 'token '.

卷曲地看它,它向请求添加 -H Authorization:token<您的令牌在这里> 到请求。

Looking at it in curl, it add -H "Authorization: token <your token here>" to the request, which is what is needed.

邮递员通过Oauth身份验证到github API