Skip to content

Authentication

Pingdex does not have typed authentication modes. There is no OAuth setting, no Basic setting and no Bearer setting, and Pingdex does not obtain or refresh tokens for you. Instead you authenticate with two general tools:

  1. Custom headers, stored per leg, for credentials the buyer expects in a header.
  2. Named secrets, referenced from the request body, for credentials the buyer expects in the payload.

Both are encrypted at rest and are never returned when you read a provider. See safe snapshots.

Headers are stored in the provider’s headers object, keyed by leg name. Each leg can have its own headers, so a ping and a post can use different credentials.

{
"headers": {
"ping": { "Authorization": "Bearer example-token-123" },
"post": { "Authorization": "Bearer example-token-123", "X-Account-Ref": "ACME-0042" }
}
}

Rules for headers:

  • Each key must name a leg that exists in the integration.
  • A leg’s header object cannot be empty.
  • Header names must be valid HTTP tokens (RFC 9110).
  • Header values must be strings, and cannot contain carriage returns, line feeds or null characters.
  • A malformed header rejects the whole save. It is never silently dropped.

Pingdex controls these headers itself, so you cannot set them:

  • Accept
  • Connection
  • Content-Length
  • Content-Type
  • Host
  • Transfer-Encoding

Names are matched without regard to case. At send time Pingdex also refuses other hop-by-hop and proxy headers, such as Keep-Alive, Upgrade, TE, Trailers and any Proxy- authentication header.

The Content-Type is set for you from the leg’s encoding: application/json for json, or application/x-www-form-urlencoded for form.

When you update a provider, header changes apply per leg:

You send Result
Nothing for a leg The stored headers for that leg are kept.
A non-empty object for a leg That leg’s stored headers are replaced.
The leg name in clear_header_legs That leg’s stored headers are removed.

A leg cannot appear in both headers and clear_header_legs in the same request. An empty header object is invalid, so use clear_header_legs to remove headers.

A secret is a named value stored in the provider’s secrets object. You supply the value once, then use it in a body field with a mapping of type: secret.

{
"secrets": { "api_token": "example-body-secret-456" }
}
{
"fields": {
"ApiKey": { "type": "secret", "secret": "api_token" }
}
}

The mapping stores only the name. The integration is readable, but the value is not.

Rules for secrets:

  • A secret name cannot be empty and cannot contain a dot, a carriage return or a line feed.
  • A secret value must be a non-empty string.
  • A secret used in a mapping must exist when the lead is sent. If it does not, Pingdex sends nothing and records a not_sent attempt with the error missing_mapped_field. Mark the field optional if the value may legitimately be absent. See Request mapping.
  • A secret can be referenced from more than one field and more than one leg.
You send Result
secrets omitted, null or {} Stored secrets are kept.
A non-empty secrets object The named secrets are added or replaced. Other stored secrets are kept.
Names in clear_secret_names Those secrets are deleted.

A name cannot appear in both secrets and clear_secret_names. An empty string in secrets does not delete a secret. It is rejected, and your stored credentials stay unchanged. Use clear_secret_names to remove one.

An Authorization: Bearer header on a direct post provider, sent with the post request.

Terminal window
curl https://api.pingdex.io/v1/providers \
-H "Authorization: Bearer $PINGDEX_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Example Buyer Ltd",
"integration": {
"legs": [
{
"name": "post",
"role": "commit",
"request": {
"method": "POST",
"url": "https://buyer.example/post",
"fields": {
"Email": { "type": "field", "source": "payload.email" }
}
}
}
]
},
"headers": {
"post": { "Authorization": "Bearer example-token-123" }
}
}'

The first Authorization header here authenticates you to Pingdex. The Authorization header inside headers.post is what Pingdex sends to the buyer.

Pingdex applies the same outbound policy to every quote and commit request.

Rule Behaviour
HTTPS only In production, destinations must use https. Certificates are verified.
Public addresses only In production, the destination must resolve to a public IP address. Private, loopback, link-local and other non-public addresses are refused.
No credentials in the URL A URL containing a username or password is refused.
DNS is pinned The hostname is resolved when the request is sent, and the connection is pinned to the address that passed the check.
No redirects Pingdex does not follow redirects. A 3xx response is treated as unsuccessful.

If a destination fails these checks, Pingdex sends nothing for that leg and records a not_sent attempt with the error invalid_integration. Saving the provider does not perform these network checks, so a destination can compile and still be refused when a lead is sent. See Testing and troubleshooting.