I’ve configured my oAuth Client in “APIS and services”
Next I created a new connection with Google forms in “Integration Connectors”
I then copied the redirect_uri from the “Integration Connector” and applied it to the oAuth Client in “APIs and services”.
When prompted to “Authorize” the Connector, I continually get the same error “Error 400: redirect_uri_mismatch”
I’m not sure why the error continues to appear when it looks like it’s all configured correctly. Any suggestions on how to make this work?
1 Like
Okay seems like it was just a long waiting game. Authorization now works.
My Service Account, however, can’t seem to execute calls through the googleapiclient Python APIs.
googleapiclient.errors.HttpError: <HttpError 403 when requesting https://forms.googleapis.com/v1/forms/?alt=json returned “The caller does not have permission”. Details: “The caller does not have permission”>
Here is how I’m configuring the API call:
from googleapiclient.discovery import build
from google.oauth2 import service_account
FORM_ID = "REDACTED"
DISCOVERY_DOC = "https://forms.googleapis.com/$discovery/rest?version=v1"
credentials = service_account.Credentials.from_service_account_file('project-b3ecc47d2a9e.json')
scoped_credentials = credentials.with_scopes(['profile', 'https://www.googleapis.com/auth/forms.body.readonly'])
service = build(
'forms',
'v1',
credentials=scoped_credentials,
discoveryServiceUrl=DISCOVERY_DOC,
static_discovery=False)
results = service.forms().get(formId=FORM_ID).execute()
print(results)
1 Like
Going to close this and open a new thread for the Cloud Function to Google Workspace problem I’m facing! Thanks!
1 Like