berkayk / laravel-onesignal

OneSignal Push Notifications for Laravel
505 stars 175 forks source link

Client Exception #77

Open Naskall opened 6 years ago

Naskall commented 6 years ago

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!

NaturalDevCR commented 6 years ago

Are you sure that you've set the app_id ?

Naskall commented 6 years ago

Yes, now i have other issue, the player_id isnt in the mysql DB, i dont know how i make it works.

xcesaralejandro commented 6 years ago

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 a400 Bad Requestresponse: {"errors":["Invalid app_id

and

Client error:POST https://onesignal.com/api/v1/notificationsresulted in a400 Bad Requestresponse:\n {"errors":["Invalid app_id format"]}\n

what can be failing?

SOLUTION: this error was created by permissions some files in server. verify permissions and update composer. Also upload again all project.

ilhamwahabi commented 5 years ago

@xcesaralejandro can you specifically say which is 'some files' that you mean? I think that can help another developer (include me)

ilhamwahabi commented 5 years ago

Ok, i got my solution

php artisan config:clear

solve my problem

xcesaralejandro commented 5 years ago

@IlhamWahabiGX I remember that I fixed that with:

composer update php artisan cache:clear php artisan config:clear

Trexology commented 5 years ago

I am also facing this issue, but clearing the cache does not fix it? Could this be a guzzle issue?

intelligenceBabila commented 3 years ago

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

denisakira commented 3 years ago

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 a400 Bad Request` response: {"errors":["app_id not found. You may be missing a Content-Type: application/json header."]}