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
I was implemented OneSignal::sendNotificationToExternalUser method to send notification for my users. But, then I'm getting an error like this
Client error: `POST https://onesignal.com/api/v1/notifications` resulted in a `400 Bad Request` response:
{"errors":["include_external_user_ids must be an array of non empty strings"]}
{"exception":"[object] (GuzzleHttp\\Exception\\ClientException(code: 400): Client error: `POST https://onesignal.com/api/v1/notifications` resulted in a `400 Bad Request` response:{\"errors\":[\"include_external_user_ids must be an array of non empty strings\"]} at /var/www/html/application/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113)
I was looking for the root cause, then I realized that the problem is because of my $userId variable is an integer data type.
Then I cast my $userId variable as a string
Laravel Version
6.20.44
PHP Version
7.3.27
Laravel-Onesignal Version
1.0.7
Description
I was implemented
OneSignal::sendNotificationToExternalUser
method to send notification for my users. But, then I'm getting an error like thisI was looking for the root cause, then I realized that the problem is because of my
$userId
variable is an integer data type.Then I cast my
$userId
variable as a stringThe text was updated successfully, but these errors were encountered: