Home > database >  API request in post man
API request in post man

Time:05-11

I have this endpoint:

https://fcm.googleapis.com/fcm/send

and this is Body for this Request:

{
   "to":"ecidY6ipLTQ:APA91bEdVPCb5hE_QTI2KC8JN5W7rzk-nIvmWbDK5TMa8PqxQ2_eZ8dA0Ywna8pkltZG2GpcKUZs5n6TUv3X2j_EcwRhqZ_I7YP90ae9ACaeeSdiisCPPOOtr0yJ87voM7_Ws8Ceyxy0",
   "expirationTime":null,
   "keys":{
      "p256dh":"BLVHXS5JMpe4NfrFEKF4h29CkJhDHBkv0YuktLZyOkC-1zu9ZNy6odKLV0HzFGboO7Q_YURFDNif8Gmkgt6nylo",
      "auth":"9sgELmiPIWfskF-kEtVHcA"
   }
}

I have also

Public Key : BF5zWIcdemV31vfkC7lCRQX5sMGk5OSCCesoE274aekn-QRli4DoPkpNcEqwHFBnViJzhzM3Lbl-rmtKYLzXihk

and

privateKey: '9wAuwA40itA6P8sGk11OYrN4TCc2Aal6iNte2Q5ziyU'

I want execute this Request in post man I dont know where should be Public and private keys

for this Reason I got 401 error Authentication error

I hope your help and thank you so much

CodePudding user response:

Please check in this way you can hit this using post man

first you have to enter your authorization token in bearer token

enter image description here

after that post your data in body as a json check below image it will send the notification and it's showing the status as success

enter image description here

  • Related