Skip to content
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

Created a new example for OAuth2 with Token Refresh #74

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

fivetran-pranavtotala
Copy link
Collaborator

@fivetran-pranavtotala fivetran-pranavtotala commented Jan 28, 2025

closes T-863159

Tested with fivetran debug and deploy

Added a readme file

Copy link

height bot commented Jan 28, 2025

This pull request has been linked to and will mark 1 task as "Done" when merged:

  • T-863159 Create Example of how to use OAuth2.0 with redirect URL and Connector SDK (unlink task)

💡Tip: You can link multiple Height tasks to a pull request.

Comment on lines 40 to 43
uri = AUTH_URL + urllib.parse.urlencode(param_dict)
headers = {'content-type': 'application/x-www-form-urlencoded'}

response = requests.request("POST", uri, headers=headers)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let use response = requests.post(AUTH_URL, headers=headers, data=param_dict) or similar, to make code more readable

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

passing it in params is not working as it is not encoding the url as required. changing it to request.post

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants