Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2016
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. $username = 'myusername';
  2. $password = 'mypassword';
  3. $curl = curl_init();
  4.  
  5. curl_setopt($curl, CURLOPT_POST, 1);
  6. curl_setopt($curl, CURLOPT_URL, "https://api.neteller.com/v1/oauth2/token?grant_type=client_credentials");
  7. curl_setopt($curl, CURLOPT_USERPWD, "$username:$password");
  8. curl_setopt($curl, CURLOPT_HTTPHEADER, array("Content-Type:application/json", "Cache-Control:no-cache"));
  9. curl_setopt($curl, CURLOPT_POSTFIELDS, array("scope"=>"default"));
  10. curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
  11. curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
  12.  
  13. $serverOutput = curl_exec($curl);
  14.  
  15. echo $serverOutput;
  16.  
  17. Error: { "error": "invalid_client" }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement