A connection lets you safely store API credentials for a service or system, such as Slack or Shopify. You can use a connection to authenticate REST API calls in Flow Builder's Make API call step. You must be an admin to create connections.
About connections
A connection supports one of the following API authentication methods:
- API key
- Basic authentication
- Bearer token
This authentication method determines the type of credentials the connection stores. For example, a basic authentication connection stores a username and password. After you create a connection, you can't change its authentication type.
Different APIs support different authentication methods. To determine the appropriate authentication method for an API call, consult the API's documentation.
HTTP headers for authentication types
Authentication type | HTTP header |
---|---|
API key | Set when you create the connection. See HTTP headers for API keys |
Basic authentication | Authorization: Basic |
Bearer token | Authorization: Bearer |
For more information about using a connection in Flow Builder, see Using the Make API call step in Flow Builder.
Creating a connection
You can create a connection in Admin Center from the Connections page.
To create a connection
- In Admin Center, click
Apps and integrations in the sidebar, then select Connections > Connections.
- Click Create connection.
- Select an authentication type.
- Enter a name for the connection. You can't change this name after you create the connection.
- Configure the connection's authentication credentials. The connection uses these details to authenticate REST API calls to the service or system.
- Enter an allowed domain for the connection. You can't change the allowed domain after you create the connection. For more information, see Allowed domain.
- Click Save to create the connection.
After you've created the connection, you can view its details from the Connections page in Admin Center. See Managing connections.
Allowed domain
Each connection requires a URL hostname as an allowed domain. Zendesk only passes the connection's credentials in API calls to this hostname. Attempts to use the connection with other hostnames will fail. This helps prevent an accidental leak of the connection's credentials. After you create a connection, you can't change its allowed domain.
For example, you can only use a connection with an allowed domain of "api.example.com" to make API calls to the “https://api.example.com” hostname.
Allowed domain requirements
A connection's allowed domain can't exceed 128 characters. A subdomain or domain in the value can't exceed 63 characters. The value must contain a valid domain name.
A connection always uses an https
scheme. Other schemes, such as
ftps
, are not supported.
Wildcards for allowed domain
A connection's allowed domain supports an optional wildcard (*)
subdomain. This lets you use the connection with the bare domain and any
subdomain. For example, you can use a connection with an allowed domain of
*.example.com
to authenticate API calls to "example.com" or
any subdomain of "example.com".
To use a wildcard subdomain, the first two characters of the allowed domain must
be *.
. You can't use a wildcard in other parts of the hostname.
For example, you can't use a wildcard within a hostname, such as
exam*.com
or my-*.example.com.
You can't use a wildcard with only a public domain suffix, such as
*.com
, *.com.au
, or
*.myshopify.com
. For a list of public suffixes, see the
public suffix list on
publicsuffix.org.
HTTP headers for API keys
When you create an API key connection, you must specify an HTTP header name. When the connection is used to make an API call, Zendesk passes the API key as the value for this header.
Many APIs use a custom header to accept API keys. To get the appropriate header name for an API call, consult the API's documentation.
Header name requirements
An API key connection's header name can't exceed 128 characters. The
header name can only contain letters, hyphens (-
), and
underscores (_
).
accept
accept-charset
accept-encoding
accept-language
cache-control
connection
content-md5
cookie
date
expect
from
host
if-match
if-modified-since
if-none-match
if-range
if-unmodified-since
max-forwards
pragma
proxy-authenticate
proxy-authorization
range
server
referer
te
trailer
transfer-encoding
upgrade
user-agent
via
warning
www-authenticate
- Header names starting with:
x-amz-
x-amzn-
x-forwarded-
x-zis-
0 Comments
Please sign in to leave a comment.