laravel-onesignal icon indicating copy to clipboard operation
laravel-onesignal copied to clipboard

Client Exception

Open Naskall opened this issue 6 years ago • 9 comments

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!

Naskall avatar May 22 '18 03:05 Naskall

Are you sure that you've set the app_id ?

NaturalDevCR avatar May 31 '18 20:05 NaturalDevCR

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

Naskall avatar May 31 '18 21:05 Naskall

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 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 avatar Oct 03 '18 19:10 xcesaralejandro

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

ilhamwahabi avatar Nov 24 '18 05:11 ilhamwahabi

Ok, i got my solution

php artisan config:clear

solve my problem

ilhamwahabi avatar Nov 24 '18 12:11 ilhamwahabi

@IlhamWahabiGX I remember that I fixed that with:

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

xcesaralejandro avatar Nov 24 '18 13:11 xcesaralejandro

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

Trexology avatar Sep 11 '19 06:09 Trexology

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

intelligenceBabila avatar May 26 '21 11:05 intelligenceBabila

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."]}

denisakira avatar Jun 22 '21 23:06 denisakira