EC200U CN - How to Add JWT Token in HTTPS Header (Authorization Bearer)

Hello Quectel Team,

I am using the EC200U-CN module to communicate with my server over HTTPS. I now need to include a JWT token in the Authorization header for secure API access.

What I Am Trying to Do:

I have already enable the customer header by AT+QHTTPCFG=“requestheader”,1
I want to send HTTPS POST requests to my server with the following header:

Authorization: Bearer <jwt-token>

What I Have Tried:


:white_check_mark: Method 1: All headers in a single AT+QHTTPCFG="header" command (comma-separated)

Based on Quectel HTTP AT Commands Manual:

AT+QHTTPCFG="header","Host: <server>","Content-Type: application/x-www-form-urlencoded","Content-Length: 66","Authorization: Bearer <jwt-token>"

:white_check_mark: Method 2: Sending headers one-by-one using multiple AT commands

AT+QHTTPCFG="header","Host: <server>"
AT+QHTTPCFG="header","Content-Type: application/x-www-form-urlencoded"
AT+QHTTPCFG="header","Content-Length: 66"
AT+QHTTPCFG="header","Authorization: Bearer <jwt-token>"

:white_check_mark: Method 3: Including the Authorization header directly in the POST payload

AT+QHTTPURL=68,80
<https://server/api-path>
AT+QHTTPPOST=<complete_size_of_post_data>,80,80
Host: <server>
Content-Type: application/x-www-form-urlencoded
Content-Length: 66
Authorization: Bearer <jwt-token>

device=<id>&sensor=<sensor_id>&swver=<ver>&calver=0&sendc=1

Problem:

Despite trying all three methods:

  • The server either doesn’t receive the Authorization header, or
  • The request fails to go through.
  • I suspect the JWT string length or format might be affecting how the header is parsed or accepted by the module.

Questions:

  • What is the recommended and supported way to add custom headers like JWT tokens in HTTPS requests on EC200U CN?
  • Is there any limit on header length or specific formatting required?
  • Does the module support custom Authorization headers in HTTPS, or only standard ones?

This feature is essential for securing our deployments. Your quick guidance would be highly appreciated.

Thank you,
Sachin

hi
I have been reading this post for a long time. May I ask if further support is needed for this issue?

Thanks