Retrieve a service credential

Retrieves a service credential with a specified ID.

SecuritySecretApiKey or JWT
Request
path Parameters
type
required
string

Type of service credential.

Enum: "smtp" "webhook" "mailgun" "sendgrid" "aws-ses" "oauth2" "postmark" "experian" "taxjar" "avalara" … 1 more
id
required
string <= 50 characters ^[@~\-\.\w]+$

ID of the resource.

Responses
200

Service credential retrieved.

Response Schema: application/json
host
required
string

SMTP host name.

type
required
string

Type of credential.

id
string <= 36 characters

ID of the credential.

hash
string <= 36 characters
Deprecated

ID of the credential. Use id field instead.

status
string

Status of the credential.

Enum: Description
active

Credential is active and can be used.

inactive

Credential is temporarily inactivated and cannot be used until reactivated.

deactivated

Credential is permanently deactivated and cannot be reactivated.

deactivationTime
string or null <date-time>

Date and time when the credential is deactivated.

port
integer [ 1 .. 65535 ]
Default: 25

SMTP port value.

encryption
string
Default: "none"

Encryption value.

Enum: "none" "tls" "ssl"
object (SmtpAuthorization)

Authentication type and details.

type
required
string
Default: "none"
Array of objects (SelfLink)

Related links.

Array
href
string

Link URL.

rel
string

Type of link.

Value: "self"
401

Unauthorized access. Invalid credentials used.

403

Access forbidden.

404

Resource not found.

get/service-credentials/{type}/{id}
Request samples
const credential = await api.serviceCredentials.get({type: 'webhook', id: 'service-credential-1'});
console.log(credential.fields.status);
Response samples
application/json
{
  • "id": "crd_0YV9Y706QGCB39FQD380G1ZHZH",
  • "hash": "crd_0YV9Y706QGCB39FQD380G1ZHZH",
  • "status": "active",
  • "deactivationTime": "2019-08-24T14:15:22Z",
  • "type": "smtp",
  • "host": "string",
  • "port": 25,
  • "encryption": "none",
  • "auth": {
    },
  • "_links": [
    ]
}