如何解决Github GraphQL API V4:INSUFFICIENT_SCOPES
当我使用以下查询GitHub的GraphQL API时:
def validate_subnetmask(self,input_subnetmask=None):
input_subnetmask = input_subnetmask or self.subnet_mask
我收到一条错误消息:
query RetrievePackagesAssociatedWithRepo($repo: String!,$owner: String!) {
repository(name: $repo,owner: $owner) {
packages(packageType: NPM,first: 10) {
edges {
node {
id
name
packageType
}
}
}
}
}
我点击了链接{
"errors": [
{
"type": "INSUFFICIENT_SCOPES","locations": [
{
"line": 6,"column": 11
}
],"message": "Your token has not been granted the required scopes to execute this query. The 'id' field requires one of the following scopes: ['read:packages'],but your token has only been granted the: ['read:gpg_key','read:org','read:public_key','read:repo_hook','repo','user'] scopes. Please modify your token's scopes at: https://github.com/settings/tokens."
},
,并添加了必要的权限。
我试图授权个人访问令牌以与SAML单点登录一起使用,但是没有启用SSO按钮。
development settings token
我关注的文档: Creating Personal Token! | Authorizing Personal Token!
尝试了这些方法之后,仍然出现相同的错误消息“ 您的令牌尚未被授予必需的作用域”。
通过Github的API,我的目标是检索与其存储库相关联的软件包。
有什么我想念的吗?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。