W/System.err: com.twilio.voice.AccessTokenParseException: Access token must have 3 or 5 segments
Plese need help on it.
Thank you
Steps to Reproduce
Just changed generated AccesssToken in VoiceActivity file, as per given steps.
[What actually happens]
When clicked on Call button, It showing Call Error: 20101, Invalid Access Token
Twilio Call SID(s)
You can find the Call SID in the SDK using Call.getSid() or CallInvite.getCallSid(). The Call SID can also be found on the Twilio Calls Console: https://www.twilio.com/console/voice/calls/logs.
Logs
// Log output when the issue occurs
W/System.err: com.twilio.voice.AccessTokenParseException: Access token must have 3 or 5 segments
W/System.err: at com.twilio.voice.AccessTokenParser.parse(AccessTokenParser.java:40)
W/System.err: at com.twilio.voice.AccessTokenParser.(AccessTokenParser.java:27)
W/System.err: at com.twilio.voice.EventPublisher.(EventPublisher.java:114)
W/System.err: at com.twilio.voice.Call.(Call.java:1008)
W/System.err: at com.twilio.voice.Voice.connect(Voice.java:616)
W/System.err: at com.twilio.examplecustomaudiodevice.CustomDeviceActivity.lambda$callClickListener$0$com-twilio-examplecustomaudiodevice-CustomDeviceActivity(CustomDeviceActivity.java:268)
W/System.err: at com.twilio.examplecustomaudiodevice.CustomDeviceActivity$$ExternalSyntheticLambda0.onClick(Unknown Source:2)
W/System.err: at com.android.internal.app.AlertController$ButtonHandler.handleMessage(AlertController.java:177)
W/System.err: at android.os.Handler.dispatchMessage(Handler.java:107)
W/System.err: at android.os.Looper.loop(Looper.java:221)
W/System.err: at android.app.ActivityThread.main(ActivityThread.java:7542)
W/System.err: at java.lang.reflect.Method.invoke(Native Method)
W/System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
Description
Getting below error
W/System.err: com.twilio.voice.AccessTokenParseException: Access token must have 3 or 5 segments
Plese need help on it.
Thank you
Steps to Reproduce
[What actually happens] When clicked on Call button, It showing Call Error: 20101, Invalid Access Token
Twilio Call SID(s)
You can find the Call SID in the SDK using Call.getSid() or CallInvite.getCallSid(). The Call SID can also be found on the Twilio Calls Console: https://www.twilio.com/console/voice/calls/logs.
Logs
W/System.err: com.twilio.voice.AccessTokenParseException: Access token must have 3 or 5 segments W/System.err: at com.twilio.voice.AccessTokenParser.parse(AccessTokenParser.java:40) W/System.err: at com.twilio.voice.AccessTokenParser.(AccessTokenParser.java:27)
W/System.err: at com.twilio.voice.EventPublisher.(EventPublisher.java:114)
W/System.err: at com.twilio.voice.Call.(Call.java:1008)
W/System.err: at com.twilio.voice.Voice.connect(Voice.java:616)
W/System.err: at com.twilio.examplecustomaudiodevice.CustomDeviceActivity.lambda$callClickListener$0$com-twilio-examplecustomaudiodevice-CustomDeviceActivity(CustomDeviceActivity.java:268)
W/System.err: at com.twilio.examplecustomaudiodevice.CustomDeviceActivity$$ExternalSyntheticLambda0.onClick(Unknown Source:2)
W/System.err: at com.android.internal.app.AlertController$ButtonHandler.handleMessage(AlertController.java:177)
W/System.err: at android.os.Handler.dispatchMessage(Handler.java:107)
W/System.err: at android.os.Looper.loop(Looper.java:221)
W/System.err: at android.app.ActivityThread.main(ActivityThread.java:7542)
W/System.err: at java.lang.reflect.Method.invoke(Native Method)
W/System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
Versions
All relevant version information for the issue.
Voice Android SDK
com.twilio:voice-android:6.1.1 com.twilio:audioswitch:1.1.4
OS Version
Android 10 device
Device Model
Redmi Note