• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Getting xf_token

#1
Hello ! I would like to get the value of xf_token but I'm a beginneer with xenforo and I can't see how =) Could you help me to get it please ? Thanks ! =)

More infos :
I would like to get the RED VALUE
<form action="account/toggle-visibility" method="post" class="AutoValidator visibilityForm">
<label>
<input name="visible" value="1" class="SubmitOnChange" type="checkbox">Afficher en ligne
</label>
<input name="_xfToken" value="17,1429131988,280947668325c2ff9264f57c1d639e272b2194c3" type="hidden">
</form>
 
#3
Hum, no because i use it from an external website.
Sessions are the same(like a bridge, made by me) but the path is different from the forum path. So i need to get it by code
 

Jake B.

Well-known member
#4
Ah, the token is generated with the following bit of code:
Code:
$userId . ',' . XenForo_Application::$time. ',' . sha1(XenForo_Application::$time . $csrfToken);
Where $userId = the user's ID (of course)

and $csrfToken = the value of the csrf_token field in xf_user_profile

How you get those will depend on how you setup your bridge, but that should be a good starting point.