Endpoints
When certain triggers are added to your Lair, WayScript auto-generates custom endpoints to provide external access to your tool. By default, endpoints are unique to each Lair environment (see Deployments for more details on environments) and protected to be only accessible by workspace members.

Making requests to protected endpoints

Requests to protected endpoints can be made in two ways:
  • If the requests are made through a browser, they can be authenticated through WayScript's standard account credentials. As per standard session management, WayScript stores these credentials as cookies so subsequent requests do not require repeat entry of credentials.
  • If requests are made outside of the browser, they can be authenticated using a WayScript workspace member's application key. See details below on how to access and use your application key.

Accessing your application key

Your application key can be accessed by navigating to your workspace settings and selecting "Application Key". You can then view and/or copy your application key.
Application keys are unique both per workspace member and per workspace (if the account is a member of multiple workspaces). If your application key is compromised, you can regenerated a new key, which will invalidate your old key.

Making requests using application key

Requests made to protected Lair endpoints outside the browser must pass a workspace member's application key in the Authorization header as a bearer token.
Example: curl
Example: Python
1
$ curl -H 'Authorization: Bearer <Application Key>' '<Lair endpoint URL>'
Copied!
1
import requests
2
3
headers = {
4
'Authorization': 'Bearer <Application Key>'
5
}
6
lair_endpoint_url = '<Lair endpoint>'
7
8
response = requests.get(lair_endpoint_url, headers=headers)
9
print(response.content)
Copied!

Viewing your Lair's endpoints

Navigate to the 🔗 Endpoint tab in your Lair toolbar to view a list of all generated endpoints for your Lair.

Setting endpoints to be publicly accessible

Toggle the selector to allow public access to your Lair's generated endpoints.