Hi,
I’m new to the Localization package and the google API and I cannot find enough information about my error online.
I would like to link a google spreasheet to one of my Localization Tables. So i created a google dev account and set up my credentials.
I have a “Client ID” and a “Client secret” which I copy pasted within the Google Sheets Service provider object.
I was able to Authorize correctly:
Authorized: 12/10/2021 20:22:15
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
Unfortunatly when Press the “Select Sheet” dropdown within the Google Sheet Extension of the Localization Table I get an error:
In Unity I get the following error:
GoogleApiException: Google.Apis.Requests.RequestError
API key not valid. Please pass a valid API key. [400]
Errors [
Message[API key not valid. Please pass a valid API key.] Location[ - ] Reason[badRequest] Domain[global]
]
Google.Apis.Requests.ClientServiceRequest`1+<ParseResponse>d__31[TResponse].MoveNext () (at <20147215d023497caf9ddab1d6e6c98d>:0)
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <695d1cc93cca45069c528c15c9fdd749>:0)
Google.Apis.Requests.ClientServiceRequest`1[TResponse].Execute () (at <20147215d023497caf9ddab1d6e6c98d>:0)
UnityEditor.Localization.Plugins.Google.GoogleSheets.ExecuteRequest[TResponse,TClientServiceRequest] (TClientServiceRequest req) (at Library/PackageCache/com.unity.localization@1.0.3/Editor/Plugins/Google/GoogleSheets.cs:864)
UnityEditor.Localization.Plugins.Google.GoogleSheets.GetSheets () (at Library/PackageCache/com.unity.localization@1.0.3/Editor/Plugins/Google/GoogleSheets.cs:160)
UnityEditor.Localization.Plugins.Google.GoogleSheetsExtensionPropertyDrawer.DrawSheetField (UnityEditor.Localization.Plugins.Google.GoogleSheetsExtensionPropertyDrawerData data, UnityEngine.Rect& position) (at Library/PackageCache/com.unity.localization@1.0.3/Editor/Plugins/Google/GoogleSheetsExtensionPropertyDrawer.cs:239)
UnityEditor.Localization.UI.ReorderableListExtended:smile:rawElement(Rect, Int32, Boolean, Boolean)
UnityEditorInternal.ReorderableList:smile:oListElements(Rect, Rect)
UnityEditorInternal.ReorderableList:smile:oLayoutList()
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
I know that the SpreadSheet ID is correct because I can open it using the Open button.
And I copy pasted the Sheet ID as specified in the documentation so I’m fairly sure it is correct:
https://docs.unity3d.com/Packages/com.unity.localization@0.9/manual/Google-Sheets-Syncing-StringTableCollections.html
I would really appiciate any pointers on what I should try to fix this error.
Thank you