Closed almaz1213 closed 2 months ago
you can check your serviceAccount.json
file first.
{
"type": "service_account",
"project_id": "XXXX-YYYY",
"private_key_id": "abced...",
"private_key": "-----BEGIN PRIVATE KEY-----...",
...
}
@wkpark json generated by farebase console and the json file is valid json format.
how can my checks fix the error?
@wkpark json generated by farebase console and the json file is valid json format.
how can my checks fix the error?
I can confirm that with an invalid fcm_token
, I've got the same error as yours.
params_list = [{'fcm_token': 'aaaa', 'notification_title': 'Hello World', 'notification_body': 'pyfcm 2.0.2 test from development server. thanks'}] # for async_notify_multiple_devices(params_list=params_list) args, or notify(**params_list[0])
[{'error': {'code': 400, 'message': 'The registration token is not a valid FCM registration token', 'status': 'INVALID_ARGUMENT', 'details': [{'@type': 'type.googleapis.com/google.firebase.fcm.v1.FcmError', 'errorCode': 'INVALID_ARGUMENT'}]}}]
problem in pyfcm 2.0.2 with the new fcm implementation
i think you should check scopes parameter.....
request using curl response with the same error. so, it's not in pyfcm end
we have error !
steps:
test code on the server side:
result:![1](https://github.com/olucurious/PyFCM/assets/17139263/feec9d8b-3097-47f2-8095-5f04b696f46d)
use to use method .notify_single_device but now FCMNotification has no this method