我正在嘗試issues使用 GitHub 的 Rest API 訪問分配給用戶(在本例中為我):GitHub Issues API
我只是在使用郵遞員。
我做了什么:
網址: https://api.github.com/issues
方法: GET
標題:Accept: application/vnd.github.v3 json&Authorization: token {my_token}
以上回傳:
{
"message": "Not Found",
"documentation_url": "https://docs.github.com/rest/reference/issues#list-issues-assigned-to-the-authenticated-user"
}
我知道令牌有效,因為如果我嘗試/user使用/repos/{owner}/{repo}/issues. 我在回購中創建了一些問題,所以我知道它不是空的。
我在這里做錯了什么?
uj5u.com熱心網友回復:
您的個人訪問令牌似乎沒有必要的OAuth 范圍來訪問/issues端點上提供的資訊。不知何故,GitHub 至少需要在滿足您的標準(取決于請求引數)而不是 404 狀態代碼的公共存盤庫public_repo中獲取問題的范圍。
當您的令牌具有public_repo范圍時,您將收到問題或空陣列 ( [])。要訪問私有存盤庫中的問題,您需要(完整)repo范圍。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/414996.html
標籤:
