-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getSmtpTemplates need string true
to work
#75
Comments
Same issue here
It's look like: |
Hi @giak The API expects template status to be a boolean value. |
The issue here is located in the PHP API, not @giak code:
@Spensolin is right, the |
Hi, Example: <?php
require_once(__DIR__ . '/vendor/autoload.php');
// ...
// ...
$templateStatus = "true"; //<--- "true" (string) and not true (bool)
$limit = 50;
$offset = 0;
$sort = "desc";
try {
$result = $apiInstance->getSmtpTemplates($templateStatus, $limit, $offset, $sort);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TransactionalEmailsApi->getSmtpTemplates: ', $e->getMessage(), PHP_EOL;
}
?> |
The DocBlock is incorrect, it says that it expects a boolean, however that will not work, so this should be a string. This is the right change to fix this: - * @param bool $templateStatus Filter on the status of the template. Active = true, inactive = false (optional)
+ * @param string $templateStatus Filter on the status of the template. Active = true, inactive = false (optional) Or as an alternative, booleans should be converted to |
This is still an issue today. |
need to set as parameter 1 or 0 instead
true
/false
as string in GET.WORK with templateStatus=true
https://api.sendinblue.com/v3/smtp/templates?templateStatus=true&limit=50&offset=0
DONT WORK with templateStatus=1
https://api.sendinblue.com/v3/smtp/templates?templateStatus=1&limit=50&offset=0
The text was updated successfully, but these errors were encountered: