Skip to content

Instantly share code, notes, and snippets.

@miki725
Created January 30, 2016 21:38
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 miki725/e6b8a03057026201b3f7 to your computer and use it in GitHub Desktop.
Save miki725/e6b8a03057026201b3f7 to your computer and use it in GitHub Desktop.
import requests
account_id = ''
application_id = ''
api_endpoint = 'https://api.backblaze.com/b2api/v1/b2_authorize_account'
response = requests.get(
api_endpoint,
auth=requests.auth.HTTPBasicAuth(account_id, application_id)
)
response_data = response.json()
print('auth token: ', response_data['authorizationToken'])
print('api url: ', response_data['apiUrl'])
print('download url:', response_data['downloadUrl'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment