having problems registering a user
-
hello,
I am trying to register a user from a login page located in a different site.
I have activated the plugin, added a decryption key, allowed register and added an auth code.
this is the code I am trying to run in order to register the user:$data=array( 'email' => '[email protected]', 'password' => 'somethin', 'AUTH_KEY' => 'the-key', ); $url = "https://my=site/?rest_route=/simple-jwt-login/v1/users"; $context = array( 'http' => array( 'method' => 'POST', 'header' => implode("\r\n", array('Content-Type: application/x-www-form-urlencoded',)), 'content' => http_build_query($data) ) ); //$html = file_get_contents($url, false, stream_context_create($context)); $html = file_get_contents($url); echo $html;I have tried to change the code in multiple ways, but it’s not working, and I feel like I am missing something.
I have never used REST APIs before, so I might be missing something very basic.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘having problems registering a user’ is closed to new replies.