From 90e75ef32c91010590e83595613c3bc9bc2e080a Mon Sep 17 00:00:00 2001 From: Jeffrey Linwood Date: Tue, 21 Feb 2017 10:33:40 -0600 Subject: [PATCH] Remove APN and GCM Credentials, Update README --- .env.example | 2 -- README.md | 8 +++++--- app.py | 2 -- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.env.example b/.env.example index ae09d3a..9531959 100644 --- a/.env.example +++ b/.env.example @@ -11,8 +11,6 @@ TWILIO_CHAT_SERVICE_SID= # Required for Notify TWILIO_NOTIFICATION_SERVICE_SID= -TWILIO_APN_CREDENTIAL_SID= -TWILIO_GCM_CREDENTIAL_SID= # Required for Sync TWILIO_SYNC_SERVICE_SID= diff --git a/README.md b/README.md index 0abc82e..05d39b1 100644 --- a/README.md +++ b/README.md @@ -45,8 +45,6 @@ Depending on which demos you'd like to run, you'll need to configure a few more `TWILIO_CONFIGURATION_SID` | Video | Identifier for a set of config properties for your video application - [find yours here](https://www.twilio.com/console/video/profiles) `TWILIO_SYNC_SERVICE_SID` | Sync (Preview) | Like a database for your Sync data - generate one with the curl command below. `TWILIO_NOTIFICATION_SERVICE_SID` | Notify (Preview) | You will need to create a Notify service - [generate one here](https://www.twilio.com/console/notify/services) -`TWILIO_APN_CREDENTIAL_SID` | Notify (Preview) | Adds iOS notification ability to your app - [generate one here](https://www.twilio.com/console/notify/credentials). You'll need to provision your APN push credentials to generate this. See [this](https://www.twilio.com/docs/api/ip-messaging/guides/push-notifications-ios) guide on how to do that. (Optional) -`TWILIO_GCM_CREDENTIAL_SID` | Notify (Preview) |Adds Android/GCM notification ability to your app - [generate one here](https://www.twilio.com/console/notify/credentials). You'll need to provision your GCM push credentials to generate this. See [this](https://www.twilio.com/docs/api/ip-messaging/guides/push-notifications-android) guide on how to do that (Optional) #### Temporary: Generating a Sync Service Instance @@ -60,6 +58,10 @@ curl -X POST https://preview.twilio.com/Sync/Services \ -u 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_api_secret' ``` +### Configuring Notify + +You will need to create a Notify Service through the [Twilio Console](https://www.twilio.com/console/notify/services), and add at least one credential on the [Mobile Push Credential screen](https://www.twilio.com/console/notify/credentials) (such as Apple Push Notification Service or Firebase Cloud Messaging for Android) to send notifications using Notify. + ## Run the sample application This application uses the lightweight [Flask Framework](http://flask.pocoo.org/). @@ -86,7 +88,7 @@ python app.py Your application should now be running at [http://localhost:5000](http://localhost:5000). When you're finished, deactivate your virtual environment using `deactivate`. -![Home Screen](https://cloud.githubusercontent.com/assets/809856/19532947/673cc7d6-9603-11e6-9a7c-13c0f9ab33b7.png) +![Home Screen](https://cloud.githubusercontent.com/assets/809856/23171215/8107bd9e-f817-11e6-94c5-2b132d798fae.png) ## Running the SDK Starter Kit with ngrok diff --git a/app.py b/app.py index 9dcfe4b..2a14960 100644 --- a/app.py +++ b/app.py @@ -39,8 +39,6 @@ def config(): return jsonify( TWILIO_ACCOUNT_SID=os.environ['TWILIO_ACCOUNT_SID'], TWILIO_NOTIFICATION_SERVICE_SID=os.environ['TWILIO_NOTIFICATION_SERVICE_SID'], - TWILIO_APN_CREDENTIAL_SID=os.environ['TWILIO_APN_CREDENTIAL_SID'], - TWILIO_GCM_CREDENTIAL_SID=os.environ['TWILIO_GCM_CREDENTIAL_SID'], TWILIO_API_KEY=os.environ['TWILIO_API_KEY'], TWILIO_API_SECRET=bool(os.environ['TWILIO_API_SECRET']), TWILIO_CHAT_SERVICE_SID=os.environ['TWILIO_CHAT_SERVICE_SID'],