Home >Backend Development >Golang >Insufficient authentication scope requested after trying to create schema for google workspace directory using golang client

Insufficient authentication scope requested after trying to create schema for google workspace directory using golang client

PHPz
PHPzforward
2024-02-10 17:50:091029browse

尝试使用 golang 客户端为 google 工作区目录创建架构后,请求的身份验证范围不足

php editor Apple introduced that when we try to use the golang client to create a schema for the Google workspace directory, we may encounter a problem: the requested authentication scope is insufficient. This is due to the fact that when making API calls, our authentication scope is not sufficient and the request cannot be completed. To fix this, we need to check our authentication scope setting and make sure it matches our request. By correctly configuring the authentication scope, we can successfully complete the schema creation operation for the Google workspace directory.

Question content

I try to use golang client to create a schema for the google workspace directory, Use this code:

65bdd900680

The reference content of this code is the following topic:

  1. https://developers.google.com/admin-sdk/directory/v1/guides/manage-schemas#create_schema

  2. https://developers.google.com/admin-sdk/directory/v1/quickstart/go

But every time I get this error

65bdd900691

I tried all relevant scopes but unfortunately I couldn't find the right one.

Solution

I found the correct range. This is https://www.googleapis.com/auth/admin.directory.userschema

The above is the detailed content of Insufficient authentication scope requested after trying to create schema for google workspace directory using golang client. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:stackoverflow.com. If there is any infringement, please contact admin@php.cn delete