Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to obtain FCM Token #5

Closed
Virgus opened this issue Mar 3, 2024 · 6 comments
Closed

Failed to obtain FCM Token #5

Virgus opened this issue Mar 3, 2024 · 6 comments

Comments

@Virgus
Copy link

Virgus commented Mar 3, 2024

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:

  1. Downloaded and installed the apk from the GitHub repo.
  2. Enabled permissions (SMS, Phone, Camera) for the apk
  3. Registered on the web site and clicked "Get Started" button
  4. Got the api key via the QR code scanning
  5. 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 ?

@vernu
Copy link
Owner

vernu commented Mar 3, 2024

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.

@Virgus
Copy link
Author

Virgus commented Mar 4, 2024

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.
Screenshot_20240304-012023_TextBee

@vernu
Copy link
Owner

vernu commented Mar 4, 2024

@Virgus the app utilizes Google's Firebase cloud messaging (FCM) service.
As you mentioned, it may not function properly on a degoogled phone.

@Virgus
Copy link
Author

Virgus commented Mar 4, 2024

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...

@Virgus
Copy link
Author

Virgus commented Mar 4, 2024

@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 ?

@vernu
Copy link
Owner

vernu commented Mar 4, 2024

@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.

@vernu vernu closed this as completed May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants