No matter what I try existing phone numbers in a connected account don't show up. Does this mean the connect application must provision all new phone numbers but can't use existing numbers in the user's account?
A Twilio Connect account (which is actually a subaccount of the authorizer's account) cannot access the main account phone numbers. So it works as you suspect, in order to send SMS messages from Twilio Connect subaccount you would need to purchase another Twilio phone number.
If you need additional info, I'd suggest reaching out to support via this form.
Related
Here's what I'm trying:
curl -X POST -d "Body=Hi there, this is a test message from cURL" -d 'From=+1aaabbbcccc' -d "To=+1zzzxxxyyyy" "https://api.twilio.com/2010-04-01/Accounts/$TWILIO_CONNECTED_SUBACCOUNT_SID/Messages" -u "$TWILIO_CONNECTED_MAIN_ACCOUNT_SID:$TWILIO_AUTH_TOKEN"
Where $TWILIO_CONNECTED_SUBACCOUNT_SID is a account SID with the phone number I want to send from. $TWILIO_CONNECTED_MAIN_ACCOUNT_SID is the account SID that the connect button sent back to me (has a name like "Subaccount for ConnectApp: ..."). $TWILIO_AUTH_TOKEN is my (not the connected account's) auth token.
I've tried various permutations of the 3 account SIDs but can't get any of them to work. How do I send an SMS on behalf of a connected account?
I got it to work if I purchase a new number for the $TWILIO_CONNECTED_MAIN_ACCOUNT_SID account via cURL. But I don't want to build a UI for purchasing numbers in my app, I want to let users just pick a number they already own on Twilio, from their main account. Is that possible?
Twilio developer evangelist here.
According to the docs, under permissions:
Charge account for usage
This allows your Connect App to perform actions that charge your user’s Twilio account such as make and receive phone calls, send and receive SMS messages, and buy phone numbers. Your Connect App will not have access to resources in the user’s parent account, like phone numbers. Instead, your Connect App must buy phone numbers on behalf of the user, using the Account SID passed to your Authorize URL.
Emphasis mine.
So, you cannot use a connect account to send messages from existing resources. You will need to buy a new number to send.
An alternative to using Connect here, that would give you access to the account's resources would be to have the user submit their Account SID and an API Key/Secret pair. While it's never ideal to share credentials, an API Key/Secret pair can be easily deactivated without affecting the rest of the account.
I was tasked with writing a web app which would allow customers to type and send a message on their browser (mobile or desktop) to a business. I was able to achieve this using Twilio, however the business requested that they received the messages from the customer themselves and NOT the Twilio number.
Basically, they want to establish a connection between the customer and the client via SMS
This is the way I forwarded the message:
Customer Browser -> Twilio -> Business Phone
The SMS body would include customer message, name and phone number.
The problem with this approach is that the business employees want to be able to simply press "reply" on their phone messaging app and connect directly with the customer instead of receiving the text message from a Twilio number, and starting a new message to send to the customer (apparently this doesn't integrate properly with their database).
Is there a way to send an SMS from a Twilio number but appear as if it was sent from a customer number? Hence, change the "from" / "reply-to" number.
Thank you.
Edit: I think its possible that I request and authorize customer numbers to my Twilio account. However this would mean storing customer phone numbers and I'm not sure if I have the permission to do this.
This is how you send a message (NodeJS):
client.messages.create({
body: 'Hello from Node',
to: '+12345678901', // Text this number
from: '+12345678901' // From a valid Twilio number
})
The from attribute MUST be a valid (authorized) Twilio number. Hence why customers would need to give away their number in order to become valid.
In my opinion, this is not possible and that is very good so. Think about the implications if you could just send a message from a number that you don't own. Furthermore, it is not optimal if you would request access to your customer's phone numbers. However, you could use the Twilio proxy service in order to set up the conversation between the client and the customer. For more information please visit the proxy docs. It is still in Beta but works reliably IMO.
You cannot.
Even with the authorized numbers feature, it requires an opt-in via a phone call or SMS response which your customer would have to field.
Perhaps allow a customer to include their number in the message body, which with modern phone's is as simple as clicking the number to bring up the ability to message that number
For more info see here twilio docs
We're currently building a Twilio Connect App and testing with our Twilio Projects.
Our main SID is e.g. AC336 and when flow through Twilio Connect, we get a new SID e.g. AC294
We can successfully authenticate with this SID and contact the REST API.
The issue is, this new SID (AC294) has no numbers associated with it, hence we can't send any messages. However, with our App, we want existing Twilio customers to authorise our App and use their existing numbers. We do not wish to or need to, offer to buy them numbers as they likely already have them on their account.
When we currently call the following using the 'new' SID, we get no data:
$incomingPhoneNumbers = $this->twilio->incomingPhoneNumbers
->read(array(), 20);
But if we authenticate with our parent SID e.g. AC336 then we get our phone numbers, as expected.
Is it possible, via Twilio Connect, to make the numbers available in the 'parent' SID (AC336 in our case) available to the authorised App SID (AC294 in this example)?
I'm trying to implement Twilio Connect to allow users to use their phone numbers with my app.
In the Twilio console, I see ACd8e3e060b587765318760d5bcd05e3b0 as my Account Sid. However, when I connected a Twilio Connect app to my account, it redirects me to an authorization page with a totally different Account Sid: ACbab18d9990e7af4a42feb51c96cc136f. The problem is that this Account Sid does not have any Incoming Phone Numbers. I provided all the required permissions, how do I use it?
According to the documentation:
When a user revokes permission to your Connect App, Twilio will make an HTTP request to the DeauthorizeCallbackURL. You should update your user database to reflect this.
Where can I revoke permission? Is there some list of Connect Apps which I allowed to use with my account?
I'm new to Twilio - can you send SMS messages to just anyone? It seems like it requires me to verify each and every single phone number I'd like to send messages to rather than letting me send to any one of my users.
Is this true? Is there a way I can send messages to any of my ITSM users without having to preverify their phone number?
Twilio employee here. This is a restriction for trial accounts only. Once you add a credit card to your account, you will be able to send messages to any number you would like (based on the international permissions in your account, etc).