laravel-onesignal
laravel-onesignal copied to clipboard
Client Exception
How can i fix this issue ?
Client error: POST https://onesignal.com/api/v1/notifications
resulted in a 400 Bad Request
response:
{"errors":["app_id not found. You may be missing a Content-Type: application/json header."]}
best regards!
Are you sure that you've set the app_id ?
Yes, now i have other issue, the player_id isnt in the mysql DB, i dont know how i make it works.
Same error, i have mounted a Laravel app in local server and all works ok, but when i upload the same code to different server it's not works.
GuzzleHttp \ Exception \ ClientException(400) Client error:
POST https://onesignal.com/api/v1/notificationsresulted in a
400 Bad Requestresponse: {"errors":["Invalid app_id
and
Client error:
POST https://onesignal.com/api/v1/notificationsresulted in a
400 Bad Request response:\n {"errors":["Invalid app_id format"]}\n
what can be failing?
- "php": "^7.1.3",
SOLUTION: this error was created by permissions some files in server. verify permissions and update composer. Also upload again all project.
@xcesaralejandro can you specifically say which is 'some files' that you mean? I think that can help another developer (include me)
Ok, i got my solution
php artisan config:clear
solve my problem
@IlhamWahabiGX I remember that I fixed that with:
composer update
php artisan cache:clear
php artisan config:clear
I am also facing this issue, but clearing the cache does not fix it? Could this be a guzzle issue?
Having this same issue. Have cleard cache nothing seems to work, verified if app_id is correct and it is. Verified if player id is sent properly and it is. So am confused right now. No added configuration, I setup the routnotificationonesignal. Function within the user model
I'm also having a problem. I've used xdebug to see the flow of data and the app_id is set correctly, but it keeps resulting in:
https://onesignal.com/api/v1/notificationsresulted in a
400 Bad Request` response:
{"errors":["app_id not found. You may be missing a Content-Type: application/json header."]}