API talk:Tokens

I only get '+\' as an csrf-token
Please, can somebody help me?--Mischa004 (talk) 18:14, 16 February 2015 (UTC)

My PHP-code:

$parameters = array('action' => 'query', 'meta' => 'tokens', 'format' => 'json'); $options = array(   'http' => array( 'header' => "Content-type: application/x-www-form-urlencoded\r\n", 'method' => 'POST', 'content' => http_build_query($parameters), ), ); $context = stream_context_create($options); $result = file_get_contents($wiki, false, $context); echo "$result";


 * That's how the token currently looks what you're not logged in (although there are plans to use real token for anonymous users too). Nothing to worry about. Matma Rex (talk) 20:19, 16 February 2015 (UTC)
 * Thank you! In fact, I really want to have a token to edit as a registered user. Before obtaining the token as shown above I login with this PHP-code:

Note: $wiki can be for example http://en.wikipedia.org/w/api.php --Mischa004 (talk) 20:29, 16 February 2015 (UTC)