-
Notifications
You must be signed in to change notification settings - Fork 949
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port changes everytime gspread.oauth is run #1164
Comments
I believe the solution may be to use 'local_server_flow', but I don't understand what value to pass to the 'client_config' parameter. |
Hi thank you for raising this issue. I understand your point about the port being used locally where your code run. We can look for a way to solve this. I am confused about your second comment:
What flow do you use ? the default one ? because if you use the default flow it's already the |
This error is also happening to me. Any solution for this one? If I updated that dynamically changing port number in Google Cloud > Redirect URI , error changed to "localhost refused to connect". I think this new error happened because of my machine permission for port , correct? How should I solve that kind of permission error? When I tried to search on internet , some suggested to setup flask server with this port on my own. Do I need to setup like this just to use gspread? OS: macOS |
Hi, So, I have been facing a similar issue. The port for the redirect URI keeps on changing and I get the redirect_uri mismatch error every time. Solution:
FLOW_PORT = 35669
def local_server_flow_fixed_port(client_config, scopes):
return gspread.auth.local_server_flow(
client_config=client_config, scopes=scopes, port=FLOW_PORT
)
client = gspread.auth.oauth(
flow=local_server_flow_fixed_port,
) Environment Info |
Bug:
Everytime gspread.oauth is used it uses a different port for the redirect URI which means I cant set a redirect URI for my OAuth client ID in the API dashboard. Because of the fact that I cant set a URI that will repeat the next time I run my code I constantly get the following message:
Steps to reproduce the behavior:
The expected behavior is for a static redirect URI to be produced, that way it can be defined properly in the web console. Otherwise a URI with a different port each time can't be defined in the web console for the google API.
Environment info:
The text was updated successfully, but these errors were encountered: