Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Using the new RESTful API to process remote queries
// 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 );
Copy link

Where should I get my public key and token?

Copy link

I got the same question

Copy link

+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!

Copy link

Gurbhej commented 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