Snippets

Team Zoom Python - account balance using json

Created by Terence Foxcroft last modified
# Request the credit balance for an account
# This script makes use of the Requests Library: http://docs.python-requests.org/en/latest/

import json
import requests

email_address = 'YOUR_EMAIL_ADDRESS'
rest_api_token = 'YOUR-API-TOKEN'
base_url = 'https://www.zoomconnect.com/app/api/rest/v1/'

response = requests.get(base_url + 'account/balance.json', auth=(email_address, rest_api_token))

if (response.ok):
    print 'Credit balance: ' + str(response.json()['creditBalance'])
else:
    print 'Request failed with response code' + str(response.status_code)

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.