Skip to main content

How to save access token in PHP?

I've tried saving the access token as a key/value pair in the $_SESSION variable, but if

a) I encrypt it and then save it, on the next page or request, it has changed or 

b) I don't encrypt it and save it as a string, it is deleted from $_SESSION on the next page.

 

What am I doing wrong here? I need to make multiple requests in sequence and have a feeling I shouldn't need to ask for a new access token with each one. Thanks!

Share this post

Showing 4 reactions

How would you tag this suggestion?
Please check your e-mail for a link to activate your account.