Forum Discussion

isxtn's avatar
isxtn
Advisor
2 years ago

What's the easiest way to get the Session Key within a custom component?

My end goal is to be able to 

  1. Edit / update existing post body text
  2. Add tags to a post
  3. Add a cover image to a post or just an image to a post (it's an event type, message)

Maybe using session keys and curl commands might not be the best solution for this, so if you have a better way, please LMK. 

That said,

I've looked at the various documentation about how to retrieve the session key but I am still a bit confused. 

If I am in a component, and the user is logged in, is there a simple way to get the session key? Something like

 

appCache.session

 

or some other esoteric method?

FULL DISCLOSURE: I'm not so familiar with how to use curl except in a terminal.

So even if there's an easier way to edit these things or add tags, please lmk what the easiest way to grab the session key from within a custom component anyway. 

Thanks!

    • isxtn's avatar
      isxtn
      Advisor

      Wanting to automate some things. So yes, component.

      I thought maybe I needed to use the curl commands and authentication. 

      Thanks 🙂