Retrieve a SendGrid credential

Retrieves a SendGrid credential with a specified token ID.

SecuritySecretApiKey or JWT
Request
path Parameters
hash
required
string

ID of the token.

Responses
200

SendGrid credential retrieved.

Response Schema: application/json
apiKey
required
string

SendGrid API key.

hash
string <= 50 characters

Unique resource ID. Defaults to UUID v4.

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 <date-time>

Date and time when the credential is deactivated.

Array of objects (Self) non-empty

Related resource links.

Array (non-empty)
href
required
string

Link URL.

rel
required
string

Type of link.

Value: "self"
401

Unauthorized access. Invalid credentials used.

403

Access forbidden.

404

Resource not found.

get/credential-hashes/sendgrid/{hash}
Request samples
const details = await api.credentialHashes.getSendGridCredential({hash: 'foobar-001'});
console.log(details.fields.apiKey);
Response samples
application/json
{
  • "hash": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "status": "active",
  • "deactivationTime": "2019-08-24T14:15:22Z",
  • "apiKey": "SO.WFbRlSWUQJSb40eny4RuZQ.7liHLZ4l1jaPCgbu02b-aGH-bo4RB8z9fK3aUd1heeL",
  • "_links": [
    ]
}