Deploy Twilio to existing Heroku app - heroku

I find plenty of information on deploying Twilio to a new Heroku app, thereby creating it. I'm a little stuck on the process of deploying it to an app that I already have. My app has a lot of data in the database there and I don't want to have to recreate it all. Additionally I would like my app to serve PHP pages as well. Do I need 3 Heroku apps now then? Doesn't make sense!

Twilio developer evangelist here.
You don't need to build a new application to use Twilio on Heroku. If you already have your existing application all you need to do is add the relevant endpoints for receiving SMS messages and voice calls from Twilio and deploy to your existing Heroku deployment. It is recommended that you load your Twilio Account SID and Auth Token into the Heroku config so that you can use them there too.
Is there anything specific you need to know about this? What is the application you have already built?

Related

Can add-on providers access the code of my application in Heroku without my permission?

Can add-on providers see/access the code of my application in Heroku without my permission?
No, the addons API has only a limited subset of Heroku API endpoints it can access. None of those endpoints will give them your source code, and the addons don't run directly on your dynos.
It depends on the Heroku add-on implementation and if the add-on is using the Heroku Platform API that would allow you to access your source code.
I found in Heroku Partner API a Source endpoint that allows you to download source code so it might be possible to download your app code.
https://devcenter.heroku.com/articles/platform-api-reference#source
I've created my own Heroku add-on https://elements.heroku.com/addons/knapsack-pro and from the add-on creator perspective, I can tell that I did not find any requirements or access levels for Heroku API so I believe any add-on provider could use Heroku Source API to access your code.

Hosting Microsoft Teams App Messaging Endpoint

I've been following Microsoft's Teams C# tutorials found here, and have been successful for the most part. However, I cannot seem to get my app to work when I host the messaging endpoint myself rather than via their Azure service, which is not an option for me ultimately as the pricing is outrageous for what we need it to do.
I'm hosting the endpoint myself by publishing the sample project and ensuring it's externally available via HTTPS. I can access a custom tab within Teams, so I know that it's online, it's just the messaging endpoint that seems to fail with an "unable to reach app" error when I try and use the messaging extension via a chat window.
When debugging using dev tools, I get 502 error: Bot returned unsuccessful status code Forbidden, error code 1008. Every potential solution I've seen for similar issues hasn't worked for me thus far, though I still feel like it's something incredibly obvious. Are there special steps that need taking when hosting the endpoint yourself? The docs do a very lousy job of explaining the process, probably because Microsoft want you to pay to host the app on Azure.
This is usually caused by the app id / app key not being registered or used correctly in your app, so it's not authenticating to the bot framework service properly. Where/how you do that depends a bit on what sample code / project template you started with, but it's usually somewhere in a .config file (or previously in a .bot file).
The information that you need will be in:
App Id: The Bot Settings page in Azure
App Key: from the Bot settings page, where you got the AppId above, it links to the App registration itself - within there you'll find the section on keys, and you can create a new key (if you've lost the original one)
I know it's generally an error when AppID validation fails. The bot app requests Azure AD to verify the identity.Could your web server access to Azure AD? If you deny to access to outbound with firewall, you should allow Azure IP range.
Turns out it was purely a network issue, that as of yet we still haven't actually figured out. But we tried hosting the app elsewhere and it was fine. That's my recommendation if anyone else has the same problem!

Are heroku apps anonymous?

If I have made 2 different heroku apps, can someone who randomly sees one also find the other and know that I made it? (They are not linking to each other of course)
Thanks!
If you look at Heroku Website you will notice that it is a deployment service for developers equipped with all required tools. On Heroku there is no way to find who is registered with Heroku or list of registered apps on Heroku just like Github.
So Github has a different service model, and we can easily search any repo, any author (if public). On Heroku there is no area or option to search like that.
Except that, if you are using Heroku for free and their free domain, then the prefix in start of your free domain name will let others know that you are using Heroku platform (with free package or have not configured real domain yet).
Twilio a famous SMS API service provider, has their chat service hosted on Heroku, they didn't configured the domain, hence I noticed Herokuapp in start of their chat window URL, which let me know that they are using Heroku.

Safely Storing Credentials for Different Users on Heroku Slack App

I'm making a Slack App and just implemented OAuth to take advantage of Slack's Web API. I am using the single Access Token for my particular team that I am testing on.
Should I want to distribute this app on the Slack App Directory, will I have to store the Access Token for every single team? How should I go about securely storing these? Will the Heroku database suffice?
Yes, your app needs to store the access token for each Slack team that installs it. And your app will need to access those tokens in order to enable access to that team's Slack (e.g. post a message). Most people will use a local database (e.g. MySQL) on the server to store the access tokens of each team.
No idea how secure the Heroku database is. However, since Heroku is a commercial service I would assume it can provide sufficient security for your app.

apple push cloud provider server testing

I have to set up push cloud notification server. I decided to use: http://pypi.python.org/pypi/pyapns/
The question that i have is how to test the server if i don't have an app which will be connected to the server? Is there any sample apps or services that would display the push notification? I just want to send payload using some sort of script and see if sending is successful or not. How people debug such things? Aren't there any kind of virtual env for such tasks?
I do have certificates and ID's of the app, but not the app it self, since the other people are making it. I do not use MAC, or have iOS device. I did read docs from apple.
So eventually i got the right .pem certificate and token of phone with the app-under-dev, phone had to registered as testing one for that app. I just pushed messages and waited for answer unit i got it. Apple do not provide any "easy to use" testing grounds, logs or messages for debugging. Best you can do is to separate pushing service and getting token as much as possible and when you got your hands on app do the raw testing.

Resources