-
Notifications
You must be signed in to change notification settings - Fork 29
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
Token Generation for Twilio Voice with Subaccounts #442
Comments
Hi @ihorMarynichZazmic please format your code using the Github code snippet syntax, using triple backticks. It helps with readability for debugging your issue. Let's specify further what is not working. Are you able to make outgoing calls, receive incoming calls, etc.? Do you see any crashes or strange behavior in your app? Any errors logged to console? |
Hi @mhuynh5757, Thank you for following up. Here’s some additional context to clarify the issue. Current Problem Outgoing Calls: When attempting to place an outgoing call, the app stays in the initialization phase, and no Call SID is generated in the Twilio console.
We are using the official Twilio library with subaccounts, and the necessary credentials (Account SID, API Key, API Secret) have been double-checked. Additional Details Thank you! |
Hi @ihorMarynichZazmic thanks for the further clarification and the reformatting, I really appreciate it. Are you attempting to make calls from a subaccount to a client registered with the parent account? It is my understanding that you can only make calls between clients registered to the same account SID, meaning that the following scenario will not work:
Let me verify this with my team, but I'm fairly confident this scenario will not work. |
Hello, We are not do calls between sub accounts. We are trying to make a call from sub account to our phone number in USA. So we just want make it working to call from our active phone number in sub account using sub account credentials |
Hi @varfolomejevigorzazmic thanks for the additional info. Could I ask for more details about your dev environment? Are you targeting Android or iOS? Are you using a real device or a virtual one? Do you see any errors in the native logs, Xcode for iOS and Android Studio/logcat for Android? |
Hi @mhuynh5757 Token Generation and Registration: The token appears to be generated and fetched correctly: LOG Fetching Twilio token... The call parameters include a from number (+12525422504), a recipient type (ios), and a to number (e.g., +17162885949). During the call process, the call remains in the "connecting" state and finally ends with a "Decline" error: |
We are trying to generate a token for Twilio Voice using the following code snippet:
voiceGrant = new VoiceGrant({
outgoingApplicationSid: twilioOutgoingApplicationSid,
incomingAllow: true
});
const token = new AccessToken(
twilioAccountSid,
twilioApiKey,
twilioApiSecret,
{ identity:identity }
);
token.addGrant(voiceGrant);
return token.toJwt();
We are using the official library and subaccounts, but it's not working as expected. Please assist us further.
The text was updated successfully, but these errors were encountered: