zinoubm's picture
final touches
2f9dcad
raw
history blame
392 Bytes
import google_auth_oauthlib.flow
def get_oauth_url(SCOPES, redirect_url):
flow = google_auth_oauthlib.flow.Flow.from_client_secrets_file(
"credentials.json", scopes=SCOPES
)
flow.redirect_uri = redirect_url
authorization_url, state = flow.authorization_url(
access_type="offline",
include_granted_scopes="true",
)
return authorization_url