You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/connections/sources/catalog/libraries/server/http-api/index.md
+15-18Lines changed: 15 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,19 +74,6 @@ You can reuse the access token until the expiry period specified on the OAuth ap
74
74
75
75
To send data to Segment's HTTP API, a content-type header must be set to `'application/json'`.
76
76
77
-
## Errors
78
-
79
-
Segment returns a `200` response for all API requests except errors caused by large payloads and JSON errors (which return `400` responses.) To debug events that return `200` responses but aren't accepted by Segment, use the Segment Debugger.
80
-
81
-
Common reasons events are not accepted by Segment include:
82
-
-**Payload is too large:** The HTTP API can handle API requests that are 32KB or smaller. The batch API endpoint accepts a maximum of 500KB per request, with a limit of 32KB per event in the batch. If these limits are exceeded, Segment returns a 400 Bad Request error.
83
-
-**Identifier is not present**: The HTTP API requires that each payload has a userId and/or anonymousId.
84
-
-**Track event is missing name**: All Track events sent to Segment must have an `event` field.
85
-
-**Deduplication**: Segment deduplicates events using the `messageId` field, which is automatically added to all payloads coming into Segment. If you're setting up the HTTP API yourself, ensure all events have unique messageId values with fewer than 100 characters.
86
-
-**Invalid JSON**: If you send an event with invalid JSON, Segment returns a 400 Bad Request error.
87
-
88
-
Segment welcomes feedback on API responses and error messages. [Reach out to support](https://segment.com/help/contact/){:target="_blank"} with any requests or suggestions you may have.
89
-
90
77
## Rate limits
91
78
92
79
For each workspace, Segment recommends you to not exceed 1,000 requests per second with the HTTP API. If you exceed this, Segment reserves the right to queue any additional events and process those at a rate that doesn't exceed the limit. Requests that exceed acceptable limits may be rejected with HTTP Status Code 429. When Segment rejects the requests, the response header contains `Retry-After` and `X-RateLimit-Reset` headers, which contains the number of seconds after which you can retry the request.
@@ -470,16 +457,26 @@ Destination flags are **case sensitive** and match [the destination's name in th
470
457
471
458
When sending a HTTP call from a user's device, you can collect the IP address by setting `context.direct` to `true`.
472
459
473
-
## Troubleshooting
460
+
## Errors
461
+
462
+
Segment returns a `200` response for all API requests except errors caused by large payloads and JSON errors (which return `400` responses.) To debug events that return `200` responses but aren't accepted by Segment, use the Segment Debugger.
463
+
464
+
Common reasons events are not accepted by Segment include:
465
+
-**Payload is too large:** The HTTP API can handle API requests that are 32KB or smaller. The batch API endpoint accepts a maximum of 500KB per request, with a limit of 32KB per event in the batch. If these limits are exceeded, Segment returns a 400 Bad Request error.
466
+
-**Identifier is not present**: The HTTP API requires that each payload has a userId and/or anonymousId. If you send events without either the userId or anonymousId, Segment’s tracking API responds with an no_user_anon_id error. Check the event payload and client instrumentation for more details.
467
+
-**Track event is missing name**: All Track events sent to Segment must have an `event` field.
468
+
-**Deduplication**: Segment deduplicates events using the `messageId` field, which is automatically added to all payloads coming into Segment. If you're setting up the HTTP API yourself, ensure all events have unique messageId values with fewer than 100 characters.
469
+
-**Invalid JSON**: If you send an event with invalid JSON, Segment returns a 400 Bad Request error.
470
+
-**Incorrect credentials**: Double check your credentials for your downstream destinations.
471
+
-**Destination incompatibility**: Make sure that the destination you are troubleshooting can accept server-side API calls. You can see compatibility information on the [Destination comparison by category](/docs/connections/destinations/category-compare/) page and in the documentation for your specific destination.
472
+
-**Destination-specific requirements**: Check the documentation specific to the destination to see if there are other requirements for using the method and destination that you're trying to get working.
474
473
475
-
{% include content/troubleshooting-intro.md %}
474
+
Segment welcomes feedback on API responses and error messages. [Reach out to support](https://segment.com/help/contact/){:target="_blank"} with any requests or suggestions you may have.
476
475
477
-
<!-- LR: no quickstart for this file. removing this include and manually putting in a flat text version that can be customized {% include content/troubleshooting-server-debugger.md %} -->
476
+
## Troubleshooting
478
477
479
478
### No events in my debugger
480
479
481
480
1. Double check that you've set up the library correctly.
482
481
483
482
2. Make sure that you're calling a Segment API method after the library is successfully installed—[Identify](#identify), [Track](#track), and so on.
484
-
485
-
{% include content/server-side-troubleshooting.md %}
0 commit comments