2
我正在嘗試使用GitHub Javascript API,但無法使用我的API密鑰進行身份驗證。該API Docs說,我可以使用:如何使用API密鑰對GitHub進行身份驗證?
{
username: 'my-username',
password: 'my-password'
// , token: 'or an optional oAuth token'
}
,但我想用我的API密鑰代替,就像我可以curl
在命令行中執行。 (例如)
curl --user "$user:$api_key" --include --request DELETE "https://api.github.com/repos/$user/$repo/labels/enhancement"
我已經用我的API密鑰爲token
試過,但不起作用。
是否使用API密鑰通過不支持的Github API包裝來訪問GitHub?那會很奇怪。