Cosmos DB with AT commands by using SIM868e
Hi everyone!
I am using SIM868e to communicate with Azure cosmos Db for my application. i am trying to use http GET for container from my Azure cosmos db. But i am not able to do it. I am using AT commands. Below are the AT command lines and responses:
AT
OK
AT+SAPBR=3,1,"Contype","GPRS"
OK
AT+SAPBR=3,1,APN,"internet"
OK
AT+SAPBR=1,1
OK
AT+SAPBR=2,1
+SAPBR: 1,1,"100.83.233.231"
AT+HTTPINIT
OK
AT+HTTPSSL=1
OK
AT+HTTPPARA=CID,"1"
OK
AT+HTTPPARA="URL","https://wm-testdb.documents.azure.com/dbs/WM/colls"
OK
AT+HTTPPARA="CONTENT","application/json"
OK
AT+HTTPPARA="USERDATA","Authorization:type=master&ver=1.0&sig=P5COttmodM6hiXd8FKklz7CqSYl49BZu51YOmbP9LcPdZSPM02mWUh7o7uhKw9PniUoWc8RP249ueg5Gmqb7rA==\r\nx-ms-version:2018-12-31\r\nx-ms-date:Thu, 30 Jun 2022 13:05:09 GMT"
OK
AT+HTTPACTION=0
OK
+HTTPACTION: 0,401,425
AT+HTTPREAD
+HTTPREAD: 425
{"code":"Unauthorized","message":"The input authorization token can't serve the request. The wrong key is being used or the expected payload is not built as per the protocol. For more info: https://ak
I am using primary key "Read only Keys" in authorization and real time for "x-ms-date:"