You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hello ,
when i create subscription it gives me this error "Invalid API request signature. Please refer to the documentation".
i have used Mailwizz php-sdk for create lists,campaign.All are getting created successfully except only subscriber is not getting created.
I am using Lumen framework.
this is my code for creating subscription->
// CREATE THE ENDPOINT
$endpoint = new \MailWizzApi_Endpoint_ListSubscribers();
// ADD SUBSCRIBER
$response = $endpoint->create($list_uid, array(
'EMAIL' =>'[email protected]', //$data['email'], // the confirmation email will be sent!!! Use valid email address
'FNAME' => 'ABC',
'LNAME' => 'XYZ'//$data['name']
));
var_dump($response);exit;
This is my construct function
public function __construct() {
// configuration object
$this->config = new \MailWizzApi_Config(array(
'apiUrl' => config('api_c.apiUrl'),
'publicKey' =>config('api_c.publicKey'),
'privateKey' => config('api_c.privateKey'),
// components
'components' => array(
'cache' => array(
'class' => 'MailWizzApi_Cache_File',
'filesPath' => dirname(__FILE__) . '/../../../vendor/twisted1919/mailwizz-php-sdk/MailWizzApi/Cache/data/cache', // make sure it is writable by webserver
)
),
));
// now inject the configuration and we are ready to make api calls
\MailWizzApi_Base::setConfig($this->config);
MailWizzApi_Autoloader::register();
}
I checked in mailmass dashboard, there is not this option. I'm calling this function from queue job handller so that time it gives issue.otherwise it's working properly.
hello ,
when i create subscription it gives me this error "Invalid API request signature. Please refer to the documentation".
i have used Mailwizz php-sdk for create lists,campaign.All are getting created successfully except only subscriber is not getting created.
I am using Lumen framework.
this is my code for creating subscription->
var_dump($response);exit;
This is my construct function
public function __construct() {
When i dump client request ->
object(MailWizzApi_Http_Client)#2191 (11) {
["paramsGet"]=>
object(MailWizzApi_Params)#2184 (2) {
["_data":"MailWizzApi_Params":private]=>
array(0) {
}
["_readOnly":"MailWizzApi_Params":private]=>
bool(false)
}
["paramsPost"]=>
object(MailWizzApi_Params)#2194 (2) {
["_data":"MailWizzApi_Params":private]=>
array(3) {
["EMAIL"]=>
string(24) "[email protected]"
["FNAME"]=>
string(6) "ABC"
["LNAME"]=>
string(5) "XYZ"
}
["_readOnly":"MailWizzApi_Params":private]=>
bool(false)
}
["paramsPut"]=>
object(MailWizzApi_Params)#2196 (2) {
["_data":"MailWizzApi_Params":private]=>
array(0) {
}
["_readOnly":"MailWizzApi_Params":private]=>
bool(false)
}
["paramsDelete"]=>
object(MailWizzApi_Params)#2197 (2) {
["_data":"MailWizzApi_Params":private]=>
array(0) {
}
["_readOnly":"MailWizzApi_Params":private]=>
bool(false)
}
["headers"]=>
object(MailWizzApi_Params)#2198 (2) {
["_data":"MailWizzApi_Params":private]=>
array(0) {
}
["_readOnly":"MailWizzApi_Params":private]=>
bool(false)
}
["url"]=>
string(69) "http://massmail.xxxxx.com/api/lists/aq39684ebr853/subscribers"
["timeout"]=>
int(30)
["signRequest"]=>
bool(true)
["getResponseHeaders"]=>
bool(false)
["enableCache"]=>
bool(false)
["method"]=>
string(4) "POST"
}
I got following response from server-
object(MailWizzApi_Http_Response)#2204 (11) {
["url"]=>
string(69) "http://massmail.xxxxx.com/api/lists/kh966r7z84cb9/subscribers"
["headers"]=>
NULL
["contentType"]=>
string(31) "application/json; charset=UTF-8"
["httpMessage"]=>
string(11) "Bad Request"
["curlCode"]=>
int(0)
["curlMessage"]=>
string(0) ""
["storeCurlInfo"]=>
bool(false)
["curlInfo"]=>
NULL
["body"]=>
object(MailWizzApi_Params)#2202 (2) {
["_data":"MailWizzApi_Params":private]=>
array(2) {
["status"]=>
string(5) "error"
["error"]=>
string(65) "Invalid API request signature. Please refer to the documentation."
}
["_readOnly":"MailWizzApi_Params":private]=>
bool(false)
}
["request"]=>
NULL
["_httpCode":"MailWizzApi_Http_Response":private]=>
int(400)
}
Please help me out .
Thanks in Advance.
The text was updated successfully, but these errors were encountered: