Using the new RESTful API to process remote queries
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
|// API Request|
|$url = 'http://localhost/um-api/get.user/?id=1';|
|// Include your public key and token to the URL|
|$url = add_query_arg('key', '75d9a913782eee3d990e4464ce26213e', $url );|
|$url = add_query_arg('token', 'bae6ee38cf02a50a0ac8259eed34ceb9', $url );|
|// Process your request|
|$request = wp_remote_get( $url );|
|$response = json_decode( wp_remote_retrieve_body( $request ) , true );|
|// That's it, now you can use/print the returned response|
|print_r( $response );|
May 17, 2018
I got the same question
Apr 21, 2020
+1. It would get great if someone could answer this ... Where to get the key and token to make this call ?
I will research further and update if I find out!
Dec 21, 2020
Did anyone find out where to get the PUBLIC KEY & TOKEN from??
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Where should I get my public key and token?