Merge pull request #2 from TwilioDevEd/update-notify
Update Notify Instructions
This commit is contained in:
@@ -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=
|
||||
|
||||
@@ -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`.
|
||||
|
||||

|
||||

|
||||
|
||||
## Running the SDK Starter Kit with ngrok
|
||||
|
||||
|
||||
2
app.py
2
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'],
|
||||
|
||||
@@ -5,8 +5,6 @@ $(function() {
|
||||
configureField(response, 'TWILIO_API_SECRET','twilioAPISecret',true);
|
||||
configureField(response, 'TWILIO_CONFIGURATION_SID','twilioConfigurationSID',false);
|
||||
configureField(response, 'TWILIO_NOTIFICATION_SERVICE_SID','twilioNotificationServiceSID',false);
|
||||
configureField(response, 'TWILIO_APN_CREDENTIAL_SID','twilioAPNCredentialSID',false);
|
||||
configureField(response, 'TWILIO_GCM_CREDENTIAL_SID','twilioGCMCredentialSID',false);
|
||||
configureField(response, 'TWILIO_CHAT_SERVICE_SID','twilioChatServiceSID',false);
|
||||
configureField(response, 'TWILIO_SYNC_SERVICE_SID','twilioSyncServiceSID',false);
|
||||
|
||||
|
||||
@@ -37,17 +37,7 @@
|
||||
<td class="config-product">Notify</td>
|
||||
<td class="config-key">TWILIO_NOTIFICATION_SERVICE_SID</td>
|
||||
<td class="config-value" id="twilioNotificationServiceSID"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="config-product">Notify</td>
|
||||
<td class="config-key">TWILIO_APN_CREDENTIAL_SID</td>
|
||||
<td class="config-value" id="twilioAPNCredentialSID"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="config-product">Notify</td>
|
||||
<td class="config-key">TWILIO_GCM_CREDENTIAL_SID</td>
|
||||
<td class="config-value" id="twilioGCMCredentialSID"></td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="config-product">Chat</td>
|
||||
<td class="config-key">TWILIO_CHAT_SERVICE_SID</td>
|
||||
|
||||
@@ -16,8 +16,9 @@
|
||||
</header>
|
||||
|
||||
<section>
|
||||
<h1>Send Notification</h1>
|
||||
<input type="text" id="identityInput" size="30"/>
|
||||
<h1>Send Notification to Identity</h1>
|
||||
|
||||
<input type="text" id="identityInput" placeholder="Identity" size="30"/>
|
||||
<p/>
|
||||
<input type="submit" id="sendNotificationButton" value="Send Notification"/>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user