Created
January 30, 2016 21:38
-
-
Save miki725/e6b8a03057026201b3f7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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