Can m66 send a request to https with token?

I’m getting an error when I try to set authentication token to headers with command AT+QHTTPCFG. Can m66 chip set token as headers?

1 Like

Sorry, M66 does not have this AT instruction in the AT command manual, so HTTP headers can not be set for M66.

hi i am using m66 and i can send token in header via at commands follow this:
AT+QIFGCNT=0
AT+QICSGP=1,“your sim card operator apn”
AT+QIREGAPP
AT+QIACT
AT+QHTTPCFG=“requestheader”,1 //this line active mannualy making header for your http post request
AT+QHTTPURL=<> //for example for google_com use
//AT+QHTTPURL=21
//after CONNECT response from m66 insert the link for above example use http://www.google.com
http://www.google.com
AT+QHTTPPOST=<>
/*for example for
POST /28cb158d-7b75-4992-9964-fcd145a4fd70/post HTTP/1.1
Host: webhook.site
Authorization: lablablab
Content-Type: text/plain
Content-Length: 37

hello a messaage with token in header/* //len = 183 =>AT+QHTTPPOST=183
//after see the connect in response insert the top text
POST /28cb158d-7b75-4992-9964-fcd145a4fd70/post HTTP/1.1
Host: webhook.site
Authorization: lablablab
Content-Type: text/plain
Content-Length: 37

hello a messaage with token in header
AT+QHTTPREAD=30 //use this at cmd to read the response from the server

check this website for test

a manual that can help you

I don’t know with which version of software on m66 did u said can’t but I do it with m66
now I am stuck with sending token in header via https and SSL configuration via m66 if you can help me I appreciate

  • You can refer to the following custom header Settings:
    POST /processorder.php HTTP/1.1
    Host: 220.180.239.212:8043
    Accept: /
    User-Agent: QUECTEL_MC20MODULE
    Connection: Keep-Alive
    Content-Type: application/x-www-form-urlencoded
    Content-Length: 48

Message=1111&Appleqty=2222&Orangeqty=3333&find=1

1 Like