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
use Sendpulse\RestApi\ApiClient;
use Sendpulse\RestApi\Storage\FileStorage;
class test {
public static function index()
{
define('PATH_TO_ATTACH_FILE', __FILE__);
$SPApiClient = new ApiClient(config::app('sendpulse_api_user_id'), config::app('sendpulse_api_secret'), new FileStorage());
}
}
Why do getting a token in the constructor?
When configuring via DI, userId and secret are passed, this ensures further work with the object, but it’s not a fact that any method of this object will be called ... and here there is already a call to the API to get a token
Get the token object where it is used, but not in the constructor!
i get error: Could not connect to api, check your ID and SECRET
sendpulse_api_user_id and sendpulse_api_secret i get on https://login.sendpulse.com/settings/#api.
The text was updated successfully, but these errors were encountered: