Skip to content

Instantly share code, notes, and snippets.

@leadbi
Created December 13, 2017 10:18
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 leadbi/c18c5b2e3aa31c1c43747d7bfd1f403e to your computer and use it in GitHub Desktop.
Save leadbi/c18c5b2e3aa31c1c43747d7bfd1f403e to your computer and use it in GitHub Desktop.
LeadBI Python API Call Example
# LeadBI Python Api call example
import requests
import json
# Examples
# https://gist.github.com/leadbi/82235eedc9619d33a7c7e0ba71e41985
#
# API Calls
# https://gist.github.com/leadbi/4c46c91d4f2d6fb5a3ef431c1414564b
#
# Note: Only read (GET) requests are allowed by default. For write request please send a email at info@leadbi.com
# You can create an api key pair here: https://app.leadbi.com/app/account.html#api-section
ACCESS_ID = 'your access id'
ACCESS_SECRET = 'your access secret'
headers = {
'X-Access-Id': ACCESS_ID,
'X-Access-Secret': ACCESS_SECRET
}
url = 'https://app.leadbi.com/api/v1/websites'
request = requests.get(url, headers=headers)
print(json.loads(request.text))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment