X-Request-ID header, and every error response repeats the same value as request_id in its body. Log it with each call, and include it when you contact support about a failed request.
Read the request ID
9f3c1a7e.
An error response has the ID in the body too:
X-Request-ID response header has the value 4d82b0c6, the same as request_id.
Send your own request ID
SendX-Request-ID on the request to use your own correlation ID. SocialAPI echoes your X-Request-ID in the response header and in request_id when it matches ^[a-zA-Z0-9_-]{1,64}$. Otherwise SocialAPI generates an 8-character lowercase hexadecimal ID.
SocialAPI does not check that your IDs are unique. Send a different value on each request, or you cannot tell the requests apart when you report one.
Log the request ID in your application
Log the ID of every response, not only of errors, so you can look up any call later:Report a failed request
Send support therequest_id, the HTTP method and path, and the time of the call. The request_id identifies the single request that failed.
Two other IDs identify different things:
- Delivery ID:
X-SocialAPI-Deliveryon a webhook your endpoint receives identifies one webhook delivery, not an API request. See Webhooks. - Target errors: a failed post target shows its reason in
targets[].error, with norequest_id. Report the post ID and the target’saccount_id. See Track post delivery.
Related
- Errors: the error envelope and every error code
- Authentication:
auth.*errors for a missing or invalid API key - Rate limits: handle HTTP 429 and
Retry-After - Webhooks:
X-SocialAPI-Deliveryon webhook deliveries - IDs: formats of SocialAPI object IDs