List signing secrets
const url = 'https://api.sendtruss.com/v1/webhook-secrets';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.sendtruss.com/v1/webhook-secrets \ --header 'Authorization: Bearer <token>'Oldest first, by their last four characters. Every webhook carries a signature from each of them.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Array of SecretResource
object
object
The secret’s last four characters, to tell your secrets apart.
Examplegenerated
{ "data": [ { "id": "example", "last_four": "example", "created_at": "example" } ]}Headers
Section titled “Headers”This request’s id. Quote it when you ask us about the request.
The API key is missing, malformed, revoked or expired.
object
What went wrong, for a person to read. It may change, so branch on code.
What went wrong, for your code to branch on. A new code is not a breaking change.
The entry on our errors page that explains this code.
This request’s id, the same as its Request-Id header. Quote it when you ask us about the request.
Example
{ "code": "unauthenticated"}Headers
Section titled “Headers”This request’s id. Quote it when you ask us about the request.
Too many requests. Wait for the seconds in Retry-After.
object
What went wrong, for a person to read. It may change, so branch on code.
What went wrong, for your code to branch on. A new code is not a breaking change.
The entry on our errors page that explains this code.
This request’s id, the same as its Request-Id header. Quote it when you ask us about the request.
Example
{ "code": "rate_limited"}Headers
Section titled “Headers”This request’s id. Quote it when you ask us about the request.
Seconds to wait before trying again.