/** * Change the code for an access_token * * @param string $code * @return \DirkGroenen\Pinterest\Transport\Response */ public function getOAuthToken($code) { // Build data array $data = array("grant_type" => "authorization_code", "client_id" => $this->client_id, "client_secret" => $this->client_secret, "code" => $code); // Perform post request $response = $this->request->post("oauth/token", $data); return $response; }