Getting a 403 - Forbidden for Google Service Account

后端 未结 3 1842
执笔经年
执笔经年 2020-11-29 11:47

I am trying to get an access token for Google Service Account. Following is my code -

String SERVICE_ACCOUNT_EMAIL = \"edited@developer.gserviceaccount.com\         


        
相关标签:
3条回答
  • 2020-11-29 12:17

    You need to set an admin account with:

    .setServiceAccountUser(some_admin_email)
    

    And make sure your App (with the correct scopes) is granted access in the cpanel.

    0 讨论(0)
  • 2020-11-29 12:22

    Proceed to https://admin.google.com . Login and add Security control if not exists from More Controls. Click on Security->Advance Settings->Manage ThirdParty OAuth Client Access and check that those scopes are added(comma separated) for your xxxxxxxxxxxxxxxxxx.apps.googleusercontent.com service account id/client id.

    0 讨论(0)
  • 2020-11-29 12:30

    You have to enable the specific api before using it inside https://console.developers.google.com/ library, to make it work with your api key. watch the video https://www.youtube.com/watch?v=s_G5CnAu69M.

    0 讨论(0)
提交回复
热议问题