public function verify($authyId, $token) {
    $data = array(
      'token'    => $token,
      'authy_id' => $authyId,
    );


    $result = $this->apiCall('verify', $data);

    if($result === false) {
      $this->lastError = 'AUTHY_SERVER_ERROR';
      return false;
    }

    if(isset($result->errors)) {
      if(isset($result->errors->message) && $result->errors->message == 'token is invalid') {
        $this->lastError = 'AUTHY_SERVER_BAD_OTP';
      } elseif(isset($result->errors->api_key)) {
        $this->lastError = 'AUTHY_SERVER_INVALID_API_KEY';
      } else {
        $this->lastError = 'AUTHY_SERVER_INVALID_DATA';
      }
      return false;
    }

    if(isset($result->token) && $result->token == 'is valid') {
      return true;
    }

    return false;
  }