Twilio Connect problems - twilio

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?

Related

Twilio: Send SMS from connected account

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.

Twilio - How to navigate users directly to flows edit page, if we have user credentials

I have Twilio credentails. When I listed flows, How can I directly navigate to flows edit screen? How to pass credentials along with this? I have account SID and Token.
Twilio developer evangelist here.
The API and access to the Twilio Console are completely separate when it comes to authentication. There are no provisions in the API to create an authenticated link to the console, so I don't believe you can achieve this.
Instead, your users will have to log in to the Twilio console with their own credentials. If you have multiple users, they can sign up for their own Twilio accounts and you can add them to the requisite project, so you don't have to share your username and password.

Adding Existing Numbers to Twilio Connect SID

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

Can Twilio Connect Apps access the connected account's incoming phone numbers?

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.

how to get PayPal client ID

I am developing an iphone app, i want to integrate it with PayPal which will use rest API.
I downloaded SDK 1.0.4 for iOS from this.
https://github.com/paypal/PayPal-iOS-SDK
There is a sample code given by PayPal.
But in this app i need to change PayPal client id and email address.
define kPayPalClientId #"YOUR CLIENT ID HERE"
define kPayPalReceiverEmail #"YOUR_PAYPAL_EMAIL#yourdomain.com"
how to get PayPal client id?
and how can i test it if money is transfered or not with the single PayPal account?
You can obtain your PayPal API credentials, including Client ID, by visiting the Applications page on the PayPal Developer site and logging in with your PayPal account.
Once logged in on this page, you will be assigned a sandbox Client ID, which will let you test your iOS integration against the PayPal sandbox. In your code, set the receiver email to a business sandbox account email address, then use a personal sandbox account email and password to log in to PayPal in the UI of your app. You can create business and personal sandbox accounts on the Sandbox accounts page.
To obtain your live Client ID, you will need to have a business account. If you don't yet have a business account, there is a link at the bottom of that same Applications page that will get you started. For live transactions, use your PayPal email address as the receiver email.
Log in to https://developer.paypal.com and click the Applications tab.
On the https://developer.paypal.com/webapps/developer/applications/myapps click Create App.
On the Create New App page, provide an app name.
Click Create App, and then review the information displayed about your app (as described below)
now you will get client id

Resources