Back

[SOLVED] Realtime raw api

  • 1
  • Realtime
Ivan
8 Aug, 2023, 18:30

I found this, saying I should send authentication message: https://discord.com/channels/564160730845151244/1079531935279353911/1079559668772376619

TL;DR
The user had trouble getting cookies from a request using the native HTTPClient library for ESP32. They were advised to call the 'collectHeaders' function before running 'POST' and retrieve the header using the 'header' function. The user was also asked if they were using the ArduinoHttpClient library and were provided with a JS example for sending an authentication message. The user later confirmed that they were able to get a good authenticated connection and thanked the person for their help. No further solution was provided in the thread.
Binyamin
8 Aug, 2023, 18:35
Binyamin
8 Aug, 2023, 18:36

But From what I've seen it should also work with headers and cookies

Ivan
9 Aug, 2023, 17:05

I cant seem to get cookies from the request, it goes trough and I can read the payload but nothing is returned for β€œSet-Cookie”

Ivan
9 Aug, 2023, 17:48

Yea, i get 0 headers

Ivan
9 Aug, 2023, 17:49

I am using a /v1/account/sessions/email

Binyamin
9 Aug, 2023, 17:49

Maybe you're getting the fallback one?

Ivan
9 Aug, 2023, 17:49

nothing in headers, i get 0 headers returned

Binyamin
9 Aug, 2023, 17:50

How've you made the request? When running it in software like Postman are you getting anything back?

Ivan
9 Aug, 2023, 17:51

I didnt try postman,let me give it a shot

Ivan
9 Aug, 2023, 17:58

in postman I do get cookies

Binyamin
9 Aug, 2023, 18:00

And how are you making the request to /v1/account/sessions/email in your code?

Ivan
9 Aug, 2023, 18:02
Binyamin
9 Aug, 2023, 18:11

This is arduino? Are you using this library? https://github.com/arduino-libraries/ArduinoHttpClient

Ivan
9 Aug, 2023, 18:11

yes, I am using the native HTTPClient library for esp32

Ivan
9 Aug, 2023, 18:12

thats not the library i am using

Ivan
9 Aug, 2023, 18:14

let me try that library and see of anything changes

Binyamin
9 Aug, 2023, 18:14
Ivan
9 Aug, 2023, 18:41

WOOOOOOOOOOOOOOOO

Ivan
9 Aug, 2023, 18:41

I got the cookies!

Ivan
9 Aug, 2023, 18:41

had to do what you said

Binyamin
9 Aug, 2023, 18:43

<a:agooglethumbsup:635256484682530825>

Ivan
9 Aug, 2023, 19:21

I finally did it!! I now have a good authenticated connection, I cant thank you enough for the help!! Thank you!! 🎊

Ivan
9 Aug, 2023, 19:22

[SOLVED] Realtime raw api

Ivan
9 Aug, 2023, 19:22

I'll close this now..

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more