Created
December 3, 2016 15:15
-
-
Save looneym/77e5c3c752055a677829ae24c8639a04 to your computer and use it in GitHub Desktop.
How to use a personal access token with the (unofficial) Python SDK
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
from intercom import Intercom, User | |
# Standard configuration using an app_id and API Key | |
Intercom.app_id = "my_app_id" | |
Intercom.app_api_key = "my-super-secret-api-key" | |
# Usng a Personal Access Token (jus replace the app_id and leave the key blank) | |
Intercom.app_id = "my-super-secret-PAT" | |
# Do whatever | |
user = User.find(email="bob@example.com") | |
# Pro Tip: Set your PAT as an environment in your .bashrc: | |
# export INTERCOM_PAT="PAT-goes-here" | |
# And use it in your Python program: | |
Intercom.app_id = os.environ['INTERCOM_PAT'] | |
Oh I already got this up and running last night! Thanks so much! Did not know the pro tip though
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
SDK available here: https://github.com/jkeyes/python-intercom
or simply
pip-install python-intercom