Public API Basic Authentication

The SnapLogic public API uses basic authentication. How do I get the basic authentication token outside of SnapLogic? Is there an auth endpoint? How long is the token good for?

For anybody interested in knowing how to call a SnapLogic public API using Python:

import requests
from requests.auth import HTTPBasicAuth

snaplogic_user = ""
snaplogic_password = "SuperCoolPassword"

url = "<YourOrg>"
auth = HTTPBasicAuth(snaplogic_user, snaplogic_password)

response = requests.get(url, auth=auth)

You’ll definitely want to retrieve your username and password securely, but the gist is the same.

1 Like