Ubidots Community

HTTP API: "Invalid Credentials"

Hi there
Please any help is welcome.
I have been testing to send POST request to ubidots, before coding on PIC18 MCU.
But I have a problem with credentials

Token is sent inside http header as " X-Auth-Token: BBFF-sVBYlap …"

Please find below data from server:

AT+HTTPHEAD (14)
+HTTPHEAD: DATA,216 (21)
HTTP/1.1 401 Unauthorized (27)
Server: nginx (15)
Date: Wed, 19 Oct 2022 20:45:48 GMT (37)
Content-Type: application/json (32)
Connection: close (19)
allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS (47)
vary: Authorization, Origin, Cookie (37)
(2)
(2)
OK (4)
AT+HTTPREAD=0,73 (18)
AT+HTTPREAD=0,73 (19)
OK (4)
(2)
+HTTPREAD: DATA,68 (20)
{“code”: 401002, “message”: “Incorrect authentication credentials.”} (70)
+HTTPREAD:0 (13)

I have used the token from ubidots API Credentials, but it does not work.
what about “allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS”: POST is not an option, perhaps?

I appreciate your kind support

Hello, @Ter_Turk

thanks for reaching out,

what endpoint or URL are you pointing to while making the request?
Have you tried that request via an HTTP client such as Postman or Insomnia? If that is the case, Can you share the request and the result as a screenshot hiding your token?

I’ll be attentive to your comments,

Regards,

-Santiago

Hi Santiago, thank you for your comments

I found that I dont have SSL client certificate.

APP section is not in my profile

KR