Skip to content

Instantly share code, notes, and snippets.

@TheMuellenator
Forked from angelabauer/main.py
Last active May 15, 2024 14:22
Show Gist options
  • Save TheMuellenator/974c39779ec516c4c60e918c001e48ba to your computer and use it in GitHub Desktop.
Save TheMuellenator/974c39779ec516c4c60e918c001e48ba to your computer and use it in GitHub Desktop.
Day 38 Step 5 L335 - Solution
#No Authentication
sheet_response = requests.post(sheet_endpoint, json=sheet_inputs)
#Basic Authentication
sheet_response = requests.post(
sheet_endpoint,
json=sheet_inputs,
auth=(
YOUR USERNAME,
YOUR PASSWORD,
)
)
#Bearer Token Authentication
bearer_headers = {
"Authorization": f"Bearer {YOUR TOKEN}"
}
sheet_response = requests.post(
sheet_endpoint,
json=sheet_inputs,
headers=bearer_headers
)
@j10251025
Copy link

I think anyone who has the error of unauthorized can check both requests of the first post and the second get, if one of the request you forget to paste auth or token, you will get the error. PLS CHECK THE BOTH REQUESTS!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment