# Right payload format for /api/v2/otlp/v1/logs

**URL:** <https://community.dynatrace.com/t/right-payload-format-for-api-v2-otlp-v1-logs/41609>\
**Category:** OpenTelemetry\
**Tags:** opentelemetry, documentation, dynatrace-api\
**Created:** [September 12, 2023, 3:38pm UTC](https://community.dynatrace.com/t/right-payload-format-for-api-v2-otlp-v1-logs/41609 "2023-09-12T15:38:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yosi\_Neuman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/yosi_neuman/32/9845_2.png) [@Yosi\_Neuman](https://community.dynatrace.com/u/Yosi_Neuman)\
**Post date:** [September 12, 2023, 3:38pm UTC](https://community.dynatrace.com/t/right-payload-format-for-api-v2-otlp-v1-logs/41609/1 "2023-09-12T15:38:25Z")

</div>

Hi guys,

Trying to find the right payload for the body of /api/v2/otlp/v1/logs, keep getting _Error: response status is 400_

Can anyone&nbsp; show example of A_n ExportLogsServiceRequest message in binary protobuf format_. that works?

 ![Yosi_Neuman_0-1694532790548.png](https://global.discourse-cdn.com/dynatrace/original/2X/7/723ae71746e4607b3c7e0b960510ef52ebd266af.png)

Thanks in advance

Yos

---

<div class="post-metadata">

**Author:** ![Jennifer](https://avatars.discourse-cdn.com/v4/letter/j/46a35a/32.png) [@Jennifer](https://community.dynatrace.com/u/Jennifer)\
**Post date:** [October 23, 2023, 8:49pm UTC](https://community.dynatrace.com/t/right-payload-format-for-api-v2-otlp-v1-logs/41609/2 "2023-10-23T20:49:50Z")

</div>

I am experiencing the same issue, hope to get a reply on this one.

---

<div class="post-metadata">

**Author:** ![alexander\_dt](https://avatars.discourse-cdn.com/v4/letter/a/5daacb/32.png) [@alexander\_dt](https://community.dynatrace.com/u/alexander_dt)\
**Post date:** [December 28, 2023, 6:51am UTC](https://community.dynatrace.com/t/right-payload-format-for-api-v2-otlp-v1-logs/41609/3 "2023-12-28T06:51:17Z")

</div>

Hi&nbsp;[@Yosi\_Neuman](https://community.dynatrace.com/user/6931)&nbsp;and&nbsp;[@Jennifer](https://community.dynatrace.com/user/65871),

Merry Christmas and sorry for the late response, I assume you got it working by now.

Logs are a bit special with OpenTelemetry, as - unlike traces and metrics - they are not supposed to be handled directly via your code and any OpenTelemetry APIs, but via [log bridges](https://docs.dynatrace.com/docs/shortlink/otel-overview-logs#how-to-use-opentelemetry-logs)&nbsp;only. Should there be no such bridge available, the recommended approach is to use the Collector and the applicable receiver component to read the entries and convert them to OTLP.

So, generally, one should avoid assembling the relevant messages by hand, but if your use case requires that, you’ll find more information on the protocol and the messages under the following links:

- [OTLP Specification 1.11.1 | OpenTelemetry](https://opentelemetry.io/docs/specs/otlp/#otlphttp)
- [opentelemetry-proto/opentelemetry/proto/logs/v1/logs.proto at main · open-telemetry/opentelemetry-proto · GitHub](https://github.com/open-telemetry/opentelemetry-proto/blob/main/opentelemetry/proto/logs/v1/logs.proto)

Also verify that you are using regular HTTP and **not gRPC**.
