0
因此,當爲我的g-suite開發自動化系統創建服務帳戶時,它促使我下載我認爲是服務帳戶憑證的東西。 我下載了一個叫client_secret_118180615763713827329.json文件,具有以下內容(將刪除敏感數據)服務帳戶json文件的外觀如何?
{
"installed":{
"client_id":"clientid",
"project_id":"projectname",
"auth_uri":"https://accounts.google.com/o/oauth2/auth",
"token_uri":"https://accounts.google.com/o/oauth2/token",
"auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs"
}
}
但是,我無法得到服務帳戶來獲得授權。我不斷收到以下錯誤:
Uncaught exception 'Google_Service_Exception' with message '{ "error": { "errors": [ { "domain": "global", "reason": "required", "message": "Login Required", "locationType": "header", "location": "Authorization" } ], "code": 401, "message": "Login Required" } }
任何想法有什麼不對?
我們需要查看您的代碼,然後才能幫助您解決任何問題。 – DaImTo