What are Credential Aliases?
A Credential Alias is a named credential store that scripts reference by name rather than containing the actual credentials. The credentials are stored once in the Alias — all scripts pointing to the alias automatically use the current credentials.
Credential types
- Basic Auth — username and password
- API Key — single token/key
- OAuth 2.0 — OAuth flow credentials
- Certificate — for mTLS
- SSH — for MID Server-based scripting
Creating a Credential Alias
Navigate to Connections & Credentials > Credentials. Create a new record, select the type, fill in the credentials. The credentials are encrypted at rest.
Connection Aliases
A Connection Alias combines a base URL with credential information. This means your REST scripts do not hardcode endpoints either — they reference the Connection Alias and the host URL comes from there.
Using in scripts
var rm = new sn_ws.RESTMessageV2();
rm.setHttpMethod('GET');
rm.setEndpoint(sn_cc.ConnectionInfoProvider.getEndpointURL('my_alias') + '/api/v1/items');
rm.setCredentialExcludeFields('my_alias');
var response = rm.execute();Using in Flow Designer
When configuring REST steps in Flow Designer, the Connection field references a Connection Alias directly — no scripting needed. Flow Designer handles credential injection automatically.
Benefits in practice
When a third-party API rotates its credentials, you update the Credential Alias record once. All flows and scripts using that alias immediately use the new credentials — no code changes, no hunting through 20 Business Rules.