Session coocies or global veraible

  • higolol-1319973889966870590

    Higolol

    4 months ago

    Through the API I register a new user and get a token which I write to session coocies. How can I use this token on another page inside the API, to specify it as sessionId in API headers. Is there a global variable in toddle or some other way?
    1319973890293891102-image.png
    1319973890751074364-image.png
  • lucasg-1320037286036897793

    Lucas G

    4 months ago

    There is a cookies node. Put in the “Authorization” header and it’ll populate it for it
  • Also, the go to URL action needs to be in the success event of the “Set Session Cookies
  • higolol-1320882659164950588

    Higolol

    4 months ago

    I moved the construct that is formed in headers when Auth is specified to parameters.

    In this case, it gives me the wrong link, so I hard-coded the token in sessionID - everything works fine!
    1320882658464760018-image.png
    1320882658921676932-image.png
  • kamilnader-1321026244753752084

    Kamil

    4 months ago

    Hey @Higolol I just found you post here. You need to remove "Bearer" from your sessionID query.
  • higolol-1321065593822117950

    Higolol

    4 months ago

    I did it. It das not work ^^(
    I will try again, but..
  • kamilnader-1321083295072780350

    Kamil

    4 months ago

    I have sent you a working example for Directual