Failed to obtain FCM Token
Virgus opened this issue · 6 comments
Hello, very interesting project.
I'm struggling to test it but I'm getting the message "Failed to obtain FCM Token".
Here the steps I've done so far:
- Downloaded and installed the apk from the GitHub repo.
- Enabled permissions (SMS, Phone, Camera) for the apk
- Registered on the web site and clicked "Get Started" button
- Got the api key via the QR code scanning
- Selected the default SIM
Then I've been trying several times by clicking around but I've no clue what's missing.
Could you please point me to the right steps ?
Thanks and have a nice day,
V.
EDIT: BTW I cannot see any Device ID in the app GUI. I'm using Lineage OS Android 11 version. Might this be the cause of what's going on ?
Hi @Virgus thanks for reporting this issue. I tried reproducing it but could not. could you double check your device's internet connectivity, or try clearing app data /reinstalling the app to start fresh.
Hello @vernu and thanks for your prompt reply. I tried starting over from scratch and have the same issue. Could it be caused by the fact that I'm using a degoogled phone ? Are you using google libraries for acknowledging the server of the device ID ? Infact I see no device ID in the Android app's GUI.
@Virgus the app utilizes Google's Firebase cloud messaging (FCM) service.
As you mentioned, it may not function properly on a degoogled phone.
Thanks, I feared that was the cause. To your knowledge which one is the apk that is related to the FCM service exactly ? I'm wondering if I could install it on top of my Lineage OS to have textbee working...
@vernu I made it ! Updated microg to the latest version and enabled "Device registration" and "Cloud Messaging". It worked like a charm from your website. Really nice !!!
Now I'm trying to make textbee work via Curl Post messages, to be able to integrate it in my batch and AutoIt scripts under Windows. Do you have a sample script to adapt the javascript sample snippet ?
Thanks for the tool, it opens a lot of new possibilites !
EDIT: BTW I have a dual SIM phone. How do I get the device ID to be able to send SMS via SIM2 ?
@Virgus Good to hear that it worked.
if you're working with curl you can use the following:
curl -X POST -H "Content-Type: application/json" -d '{
"receivers": ["+251912345678"],
"smsBody": "Your Message"
}' 'https://api.textbee.vernu.dev/api/v1/gateway/devices/DEVICE_ID/sendSMS?apiKey=API_KEY'
Regarding selecting the sender SIM, currently, there is no way to specify which SIM to send from in the API request. However you can select the preferred SIM from the Android app.