简体   繁体   English

资源上的权限“documentai.processors.processOnline”被拒绝(或者它可能不存在)

[英]Permission 'documentai.processors.processOnline' denied on resource (or it may not exist)

I am trying to send a POST request to the Cloud Document AI API using Postman.我正在尝试使用 Postman 向云文档 AI API 发送 POST 请求。 I have tried sending a POST request with the API key included, along with providing an OAuth access token as the OAuth 2.0 Authorization (generated using gcloud auth application-default print-access-token).我尝试发送一个包含 API 密钥的 POST 请求,同时提供一个 OAuth 访问令牌作为 OAuth 2.0 授权(使用 gtoken-default-access 生成) However, this error is returned:但是,返回此错误:

{
"error": {
    "code": 403,
    "message": "Permission 'documentai.processors.processOnline' denied on resource '//documentai.googleapis.com/projects/<project id>/locations/us/processors/<processor id>' (or it may not exist).",
    "status": "PERMISSION_DENIED",
    "details": [
        {
            "@type": "type.googleapis.com/google.rpc.ErrorInfo",
            "reason": "IAM_PERMISSION_DENIED",
            "domain": "documentai.googleapis.com",
            "metadata": {
                "resource": "projects/<project id>/locations/us/processors/<processor id>",
                "permission": "documentai.processors.processOnline"
            }
        }
    ]
}

I think this this a problem with the service account permission.我认为这是服务帐户权限的问题。 If so, is there any way I can resolve this if I don't have the access to change roles?如果是这样,如果我无权更改角色,有什么办法可以解决这个问题?

Just to give an update to this question.只是为了更新这个问题。 The problem was related to the service account permission.该问题与服务帐户权限有关。 There is no way to resolve this without setting up your service account with the correct permission .如果不使用正确的权限设置您的服务帐户,则无法解决此问题。 Once you have correctly set up your service account, by using the service account key of said account, you should be able to resolve this problem.正确设置服务帐户后,通过使用该帐户的服务帐户密钥,您应该能够解决此问题。

TLDR; TLDR; Follow the documentation ( https://cloud.google.com/document-ai/docs/setup#auth ) properly.正确遵循文档 ( https://cloud.google.com/document-ai/docs/setup#auth )。 If you don't have access to the Google Account (like I did), try to get access to it.如果您无权访问 Google 帐户(就像我一样),请尝试访问它。 If not, I don't think there is another way around it.如果没有,我认为没有其他方法可以解决它。

I struggled with this question as well.我也为这个问题而苦苦挣扎。 To resolve the issue, go to IAM roles and change the role of your service account to Document AI service user.要解决此问题,请将 go 更改为 IAM 角色,并将您的服务帐户的角色更改为 Document AI 服务用户。 The default is Document AI service Agent默认为 Document AI 服务代理

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 DocumentError“权限‘documentai.processors.processOnline’在资源‘我的处理器’上被拒绝(或者它可能不存在) - DocumentError "Permission 'documentai.processors.processOnline' denied on resource 'my processors' (or it may not exist) PERMISSION_DENIED:资源“//documentai.googleapis.com/project...”上的权限“documentai.processors.processOnline”被拒绝(或者它可能不存在)。 - PERMISSION_DENIED: Permission 'documentai.processors.processOnline' denied on resource '//documentai.googleapis.com/project...'(or it may not exist)." 资源上的权限“cloudkms.cryptoKeyVersions.viewPublicKey”被拒绝,或者它可能不存在 - Permission 'cloudkms.cryptoKeyVersions.viewPublicKey' denied on resource or it may not exist 权限 bigquery.tables.get 被拒绝或可能不存在 - Permission bigquery.tables.get denied or it may not exist gcloud app deploy 失败并显示 Failed to create cloud build: Permission denied on 'locations/xyz' (or it may not exist) - gcloud app deploy is failing with Failed to create cloud build: Permission denied on 'locations/xyz' (or it may not exist) Terraform:googleapi:错误 403:资源项目权限被拒绝 - Terraform: googleapi: Error 403: Permission denied on resource project PERMISSION_DENIED:项目配额不足,无法满足请求:资源 - PERMISSION_DENIED: Insufficient project quota to satisfy request: resource 错误:被拒绝:资源上的权限“artifactregistry.repositories.downloadArtifacts”被拒绝 - Error: denied: Permission "artifactregistry.repositories.downloadArtifacts" denied on resource 资源上的权限“firebasemessagingcampaigns.campaigns.create”被拒绝 - Permission 'firebasemessagingcampaigns.campaigns.create' denied on resource docker 拉取:资源上的权限“artifactregistry.repositories.downloadArtifacts”被拒绝 - docker pull: Permission "artifactregistry.repositories.downloadArtifacts" denied on resource
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM