Skip to content

Instantly share code, notes, and snippets.

@chadhutchins
Created December 27, 2018 04:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chadhutchins/43d4e78459a1979aa868a7c36821a4f2 to your computer and use it in GitHub Desktop.
Save chadhutchins/43d4e78459a1979aa868a7c36821a4f2 to your computer and use it in GitHub Desktop.
<?php
// given a proper $token and $consumer...
require_once('include/api/RestService.php');
require_once('clients/base/api/OAuth2Api.php');
$service = new RestService();
$api = new OAuth2Api();
$response = $api->token($service,array(
"client_secret" => $consumer->c_secret,
"client_id" => $consumer->c_key,
"platform" => $token->platform,
"grant_type" => $grant_type,
"refresh_token" => $token->id,
));
// ^^^ throws exception in the logs:
// Exception in Controller: {"error":"invalid_request","error_description":"invalid_request"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment