
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2022 12:44 PM
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?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2022 01:27 PM
For anybody interested in knowing how to call a SnapLogic public API using Python:
import requests
from requests.auth import HTTPBasicAuth
snaplogic_user = "user@user.com"
snaplogic_password = "SuperCoolPassword"
url = "https://elastic.snaplogic.com/api/1/rest/public/runtime/<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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours ago
You can also send a request to the following endpoint:
{{SL_DOMAIN}}/api/1/rest/asset/session
The response will include a SnapLogic session token in the response_map, which will expire after 3300 seconds.
Use following token in the header in your subsequent request:
Authorization: SLToken {{SLtoken_value_from_auth_endpoint}}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2022 01:27 PM
For anybody interested in knowing how to call a SnapLogic public API using Python:
import requests
from requests.auth import HTTPBasicAuth
snaplogic_user = "user@user.com"
snaplogic_password = "SuperCoolPassword"
url = "https://elastic.snaplogic.com/api/1/rest/public/runtime/<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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours ago
You can also send a request to the following endpoint:
{{SL_DOMAIN}}/api/1/rest/asset/session
The response will include a SnapLogic session token in the response_map, which will expire after 3300 seconds.
Use following token in the header in your subsequent request:
Authorization: SLToken {{SLtoken_value_from_auth_endpoint}}
