Skip to content

Instantly share code, notes, and snippets.

@austincollinpena
Created February 27, 2020 06:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save austincollinpena/09e41690807a2f2614878f88696b16f6 to your computer and use it in GitHub Desktop.
Save austincollinpena/09e41690807a2f2614878f88696b16f6 to your computer and use it in GitHub Desktop.
Make a curl request that requires authentication in python
numbersJSON = requests.get(
# Start with the URL
f'https://api.twilio.com/2010-04-01/Accounts/{self._account_sid}/AvailablePhoneNumbers/US/local.json?AreaCode={self.area_code}',
# Pass through your credentials like this
auth=(self._account_sid, self._auth_token))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment