-
Notifications
You must be signed in to change notification settings - Fork 215
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
[Bug]: Invalid token
format for device type SMS
#915
Comments
Issue SummaryI had logged in using Additionally, when I called the SolutionI resolved this issue by taking the following steps:
This approach worked for me, and I am now closing this issue. |
Hi @ramithks thank you for reporting this. This looks like a bug in the SDK. The correct order is to call To workaround the current bug, you can delay adding email and SMS until later. |
Hey @nan-li, For me, it's the opposite. I was initially using the approach you mentioned, but since it wasn't working, I'm now calling the I believe there might be an issue with the SDK (perhaps we are attaching the wrong token while sending a patch/post request). Additionally, I have a question: However, we are confused about which method to use for different scenarios. There are so many observables, Booleans, permissions, and more. The example provided includes all the methods and just calls them. Is there a proper example or blog post supporting this? I've been working on this for a week but still haven't figured it out, and even ChatGPT, Claude AI, and Gemini are confused too. Any help would be much appreciated. |
Hi @ramithks the initial approach is correct, but when the email and SMS are added at the same time as You are asking about prompting and managing notifications permissions, correct? |
What I meant is that we will allow notifications at the beginning (from the system prompt). Later, users should be able to disable them in the app’s settings (if allowed). Conversely, if notifications are disallowed initially, we need to enable them later, right? Regarding the mobile SDK reference, it's very much confusing. There is no practical guidance. If you provide me with sample projects or any blog posts that would be helpful. 🚀 |
@nan-li Has this been fixed? Because we are experiencing the exact same issue in the Web SDK. Calling addSms and addEmail after login does not work. Calling login AFTER calling those methods sometimes work. Still feels buggy though |
Hi @ramithks, I am seeing your updated question now. We have worked on improved documentation, you can start with the User Model overview. This SDK also has a small example project under the example directory. |
Hi @sfratini the web SDK behaves differently from the mobile SDKs. Can you please search through the issues or open a new one with details at https://github.com/OneSignal/OneSignal-Website-SDK/issues? |
What happened?
I have logged in using
OneSignal.login
and then calledaddSms
andaddEmail
. I can see these pieces of information in the OneSignal Dashboard as different channels (i.e., Push, SMS, and Email). My question is: why are they being created as different channels (or why are they appearing in different rows)?Additionally, when I called the
Signal.Notifications.requestPermission(true)
method, I received the following error message: "Invalidtoken
format for device type SMS." In the OneSignal dashboard, it also indicates "permission not granted."My PushNotificationsController:
What did you expect to happen?
No errors should be displayed when requesting permission, and the push notifications permission should be granted.
OneSignal Flutter SDK version
^5.2.1
Which platform(s) are affected?
Relevant log output
Code of Conduct
The text was updated successfully, but these errors were encountered: