Skip to content

Instantly share code, notes, and snippets.

@juque
Created June 18, 2014 16:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save juque/275d9d661f4f9d968afb to your computer and use it in GitHub Desktop.
Save juque/275d9d661f4f9d968afb to your computer and use it in GitHub Desktop.
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"https://auth.bootic.net/oauth/token");
curl_setopt($ch, CURLOPT_USERPWD, "client_id:client_secret");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "grant_type=client_credentials&scope=admin");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$server_output = curl_exec ($ch);
curl_close ($ch);
print_r($server_output);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment