private function requestToken($code, $tokenType) {
		$authApi = new PestJSON("{$_SESSION[self::SESSION][self::OAUTH_ENDPOINT]}");
		try {
			$response = $authApi->post('token',
				array(
					self::CLIENT_ID => $_SESSION[self::SESSION][self::CLIENT_ID],
					self::REDIRECT_URI => $_SESSION[self::SESSION][self::REDIRECT_URI],
					self::STATE => self::$SCOPES[$tokenType][self::TOKEN_PROVIDED],
					self::CLIENT_SECRET => $_SESSION[self::SESSION][self::CLIENT_SECRET],
					self::CODE => $code,
				)
			);
		} catch (Pest_ServerError $e) {
			echo $e->getMessage();
			exit;
		}
		if ($response) {
			if (isset($response['access_token'])) {
				$_SESSION[self::SESSION][self::TOKEN] = $response['access_token'];
				return true;
			} else {
				throw new OAuthNegotiator_Exception(
					'Access token not received',
					OAuthNegotiator_Exception::TOKEN_RESPONSE
				);
			}
		} else {
			throw new OAuthNegotiator_Exception(
				'Unexpected OAuth response',
				OAuthNegotiator_Exception::TOKEN_RESPONSE
			);
		}
	}