Google Admin SDK 403 Not Authorized to Access this Resource/API

后端 未结 4 504
孤城傲影
孤城傲影 2021-01-13 02:36

I use the following code in a java web application to try to get all users of a group:

GoogleCredential credential = GoogleCredential.fromStream(Util.class.g         


        
4条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-13 03:21

    As suggested by this answer to a related question, including the sub (subject, I think) to indicate the email address of a delegated admin in your Google Apps account is a necessary step for the API calls to work. That delegated admin will also probably need to be authorized to access/modify the data or endpoints you are calling. Since my experience has been with the PHP client, not Java, I don't know the specifics of how you will provide that email address to the Java classes in use in your example.

提交回复
热议问题