我用这个代码
#!/usr/bin/php
<?php
require_once('whatsapp_whatsapi_config.php');
$destinationPhone = 'xxxx';
$w = new WhatsProt($userPhone,0, $userName, $debug);
$w->Connect();
$w->LoginWithPassword($password);
$message = 'WhatsApp';
$w->Message($destinationPhone, $message);
echo "Mensaje enviado exitosamente";
?>
Run Code Online (Sandbox Code Playgroud)
并显示此错误
PHP Fatal error: Uncaught exception 'LoginFailureException' in /var/www/html/whats/src/whatsprot.class.php:2274
Stack trace:
/var/www/html/whats/src/whatsprot.class.php(552): WhatsProt->doLogin()
/var/www/html/whats/whatsapp_whatsapi_send.php(13): WhatsProt->loginWithPassword('Mu7q0hq/vRSLFCU...')
{main}
thrown in /var/www/html/whats/src/whatsprot.class.php on line 2274
Run Code Online (Sandbox Code Playgroud)
我尝试使用WART应用,但生成的密码不正确
我一直在一个服务链中工作,该服务链通过 WSO2 EMM 中使用的不记名令牌来回答我。我在 ESB 中创建了一个代理,然后传递给一个新的序列来进行下一次调用,但是这个序列接收到一个 Content-Type application/x-www-form-urlencoded。我一直在寻求一些帮助,以便能找到任何有趣的东西。
这是我的代理
<?xml version="1.0" encoding="UTF-8"?>
<proxy name="TokenService" startOnLoad="true" statistics="enable"
trace="enable" transports="http https" xmlns="http://ws.apache.org/ns/synapse">
<target>
<inSequence>
<!--Aggregate incoming responses -->
<log level="full">
<property name="sequence" value="Paso 1 - request for client register"/>
</log>
<property description="Content-Type" name="ContentType"
scope="default" type="STRING" value="application/json"/>
<header name="Accept" scope="transport" value="application/json"/>
<payloadFactory description="Payload" media-type="json">
<format>{
"owner": "admin",
"clientName": "admin_emm",
"grantType":
"refresh_token password client_credentials",
"tokenScope": "prod"
}</format>
<args/>
</payloadFactory>
<send receive="Mensaje"/>
</inSequence>
<outSequence/>
<faultSequence/>
</target>
</proxy>
Run Code Online (Sandbox Code Playgroud)
这是我从代理中的其他服务获取响应的序列
<?xml version="1.0" encoding="UTF-8"?>
<sequence name="Mensaje" trace="enable" xmlns="http://ws.apache.org/ns/synapse"> …Run Code Online (Sandbox Code Playgroud)