Skip to content

Instantly share code, notes, and snippets.

@miki725
Created Jan 30, 2016
Embed
What would you like to do?
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