Hi,
There is my scenario:
I have a button in a debug menu where I copy into my clipboard an FCM device id and then I use it the following way:
deviceToken = self.driver.get_clipboard_text()
afterwards, I use this variable in my ‘body’ like:
body = {
"to": deviceToken,
"notification": {
"body": "Welcome to blabla",
"title": "Bla bla trully loves you, did you know that?",
"priority": "high"
}
But unfortunately, I get the following response:
200
{'multicast_id': 3155000136518118544, 'success': 0, 'failure': 1, 'canonical_ids': 0, 'results': [{'error': 'InvalidRegistration'}]}
I dont think it’s an Appium issue, but maybe the way I use the get_clipboard_text into my variable, because if I put the FCM id manually like here:
deviceToken = 'dI2jZgvnTkODJ9-0WHkRLT:APA91bENeuYA9TqabkiVCLD8toZ1n85KlWHWHmUsgs_9ixHWiDH9uFtZYTW1PVTN8eGs9cU8lc2j2FlwINdfUdyd3PxBoT3DpcZ0iRZoOaz7Ji_hD0yjnHlwx4urRei4fguwF5sAx1Pj'
It will work without any kind of issue.
Any thoughts on how exactly should I insert the id into the variable? Maybe to add some commas, idk…
Thanks!