expanding apis beyond the web
TRANSCRIPT
![Page 1: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/1.jpg)
@Braintree_Dev @SeraAndroid
Expanding APIs beyond the Web
Tim Messerschmidt
<Head of Developer Advocacy, EMEA/>
Braintree_Dev.
#APIDays Paris
![Page 2: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/2.jpg)
@Braintree_Dev @SeraAndroid
![Page 3: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/3.jpg)
@Braintree_Dev @SeraAndroid
That’s me
![Page 4: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/4.jpg)
@Braintree_Dev @SeraAndroid@Braintree_Dev @SeraAndroid
![Page 5: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/5.jpg)
@Braintree_Dev @SeraAndroid
OFF FUTUREPayment Method
ON
ON
ON
ON
Braintree
![Page 6: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/6.jpg)
@Braintree_Dev @SeraAndroid
>3 key requirements in tech
![Page 7: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/7.jpg)
@Braintree_Dev @SeraAndroidSECURITY
![Page 8: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/8.jpg)
@Braintree_Dev @SeraAndroidFLEXIBILITY
![Page 9: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/9.jpg)
@Braintree_Dev @SeraAndroidSCALABILITY
![Page 10: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/10.jpg)
@Braintree_Dev @SeraAndroid
>Current technology landscape
![Page 11: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/11.jpg)
@Braintree_Dev @SeraAndroid@Braintree_Dev @SeraAndroid
![Page 12: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/12.jpg)
@Braintree_Dev @SeraAndroid@Braintree_Dev @SeraAndroid
![Page 13: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/13.jpg)
@Braintree_Dev @SeraAndroid
Bluetooth LE
![Page 14: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/14.jpg)
@Braintree_Dev @SeraAndroid
Differences BLE vs. Bluetooth
• Lower range (50m vs 100m)
• Lower latency (Factor 16)
• Lower battery consumption (Factor 100)
nodesagency.com/the-beacon-dictionary
![Page 15: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/15.jpg)
@Braintree_Dev @SeraAndroid@Braintree_Dev @SeraAndroidESTIMOTE BEACONS
![Page 16: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/16.jpg)
@Braintree_Dev @SeraAndroid
>Payments in the background
![Page 17: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/17.jpg)
@Braintree_Dev @SeraAndroid
![Page 18: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/18.jpg)
@Braintree_Dev @SeraAndroid
>Wearables and Biometrics
![Page 19: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/19.jpg)
@Braintree_Dev @SeraAndroidFINGERPRINT AS UNIQUE TOKEN
![Page 20: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/20.jpg)
@Braintree_Dev @SeraAndroidHEARTBEAT AS IDENTIFIER
![Page 21: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/21.jpg)
@Braintree_Dev @SeraAndroid
A Trusted Environment
![Page 22: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/22.jpg)
@Braintree_Dev @SeraAndroid
“Favor security too much over the experience
and you’ll make the website a pain to use.”
smashingmagazine.com/2012/10/26/password-masking-hurt-signup-form
![Page 23: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/23.jpg)
@Braintree_Dev @SeraAndroid
>Introducing: The Hype Cyclegartner.com/newsroom/id/2819918 (2014)
![Page 24: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/24.jpg)
@Braintree_Dev @SeraAndroid
![Page 25: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/25.jpg)
@Braintree_Dev @SeraAndroid
![Page 26: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/26.jpg)
@Braintree_Dev @SeraAndroid
![Page 27: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/27.jpg)
@Braintree_Dev @SeraAndroid
![Page 28: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/28.jpg)
@Braintree_Dev @SeraAndroid
>26 Billion IoT devices by 2020gartner.com/newsroom/id/2636073 (2013)
![Page 29: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/29.jpg)
@Braintree_Dev @SeraAndroid
>2020: 200 billion smart devicesintel.ly/1i8O2ec (2014)
![Page 30: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/30.jpg)
@Braintree_Dev @SeraAndroid@Braintree_Dev @SeraAndroid
6 Billion 15 Billion
200 Billion
0
50
100
150
200
250
2006 2015 2020
The Explosion of IoT devices
![Page 31: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/31.jpg)
@Braintree_Dev @SeraAndroid
>The Age of Rapid Prototyping
![Page 32: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/32.jpg)
@Braintree_Dev @SeraAndroid
>The Movement of Open Source
![Page 33: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/33.jpg)
@Braintree_Dev @SeraAndroid
>A new Full Stack Developer
![Page 34: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/34.jpg)
@Braintree_Dev @SeraAndroid
>Evaluation of available hardware
![Page 35: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/35.jpg)
@Braintree_Dev @SeraAndroidRaspberry Pi
![Page 36: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/36.jpg)
@Braintree_Dev @SeraAndroidArduino Yún
![Page 37: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/37.jpg)
@Braintree_Dev @SeraAndroidIntel Edison
![Page 38: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/38.jpg)
@Braintree_Dev @SeraAndroidThe Spark Core
![Page 39: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/39.jpg)
@Braintree_Dev @SeraAndroid
IoT Authentication1. Non-expiring pre-generated Access Token
2. Access Token dynamically requested
![Page 40: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/40.jpg)
@Braintree_Dev @SeraAndroid
Receiving an OAuth Access Token
POSThttps://api.spark.io/oauth/token
PARAMS{
"grant_type": "password"
"username": { Your Email Address }
"password": { Password }
}
![Page 41: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/41.jpg)
@Braintree_Dev @SeraAndroid
Sending Data to the Core
POST
https://api.spark.io/v1/devices/{deviceid}/{route}
PARAMS
{
"access_token": {OAuth Access Token}
"args": {Payload}
}
![Page 42: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/42.jpg)
@Braintree_Dev @SeraAndroid
Registering Functions
void setup() {
Spark.function("handler", handlePayload);
}
void loop() {
...
}
int handlePayload(String payload) {
...
}
![Page 43: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/43.jpg)
@Braintree_Dev @SeraAndroid
Registering Functions
void setup() {
Spark.function("handler", handlePayload);
}
void loop() {
...
}
int handlePayload(String payload) {
...
}
![Page 44: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/44.jpg)
@Braintree_Dev @SeraAndroid
Registering Functions
void setup() {
Spark.function("handler", handlePayload);
}
void loop() {
...
}
int handlePayload(String payload) {
...
}
![Page 45: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/45.jpg)
@Braintree_Dev @SeraAndroid
Registering Functions
void setup() {
Spark.function("handler", handlePayload);
}
void loop() {
...
}
int handlePayload(String payload) {
...
}
![Page 46: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/46.jpg)
@Braintree_Dev @SeraAndroid
Braintree's v.zero on a
POS devicedevelopers.braintreepayments.com
github.com/SeraphimSerapis/vzero-iot-node
![Page 47: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/47.jpg)
@Braintree_Dev @SeraAndroid@Braintree_Dev @SeraAndroid
Frontend
JS
Backend
Node.js
Spark
Core
BraintreeSpark
Cloud
![Page 48: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/48.jpg)
@Braintree_Dev @SeraAndroid
![Page 49: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/49.jpg)
@Braintree_Dev @SeraAndroid
Sending transactions to the Spark
var formData = {
access_token: sparkToken,
params: amount + ',' + method
};
request.post({
url: 'https://api.spark.io/v1/devices/' + sparkDeviceID + '/pay',
form: formData }, function (err, httpResponse, body) {
if (err) {
console.log(err);
} else {
console.log(body);
}
});
![Page 50: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/50.jpg)
@Braintree_Dev @SeraAndroid
Sending transactions to the Spark
var formData = {
access_token: sparkToken,
params: amount + ',' + method
};
request.post({
url: 'https://api.spark.io/v1/devices/' + sparkDeviceID + '/pay',
form: formData }, function (err, httpResponse, body) {
if (err) {
console.log(err);
} else {
console.log(body);
}
});
![Page 51: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/51.jpg)
@Braintree_Dev @SeraAndroid
Sending transactions to the Spark
var formData = {
access_token: sparkToken,
params: amount + ',' + method
};
request.post({
url: 'https://api.spark.io/v1/devices/' + sparkDeviceID + '/pay',
form: formData }, function (err, httpResponse, body) {
if (err) {
console.log(err);
} else {
console.log(body);
}
});
![Page 52: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/52.jpg)
@Braintree_Dev @SeraAndroid
Sending transactions to the Spark
var formData = {
access_token: sparkToken,
params: amount + ',' + method
};
request.post({
url: 'https://api.spark.io/v1/devices/' + sparkDeviceID + '/pay',
form: formData }, function (err, httpResponse, body) {
if (err) {
console.log(err);
} else {
console.log(body);
}
});
![Page 53: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/53.jpg)
@Braintree_Dev @SeraAndroid
Spark Support for SSE
“A server-sent event is when a web page automatically gets
updates from a server.”
w3schools.com/Html/html5_serversentevents.asp
![Page 54: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/54.jpg)
@Braintree_Dev @SeraAndroid
>A new Standard: FIDO Alliance
![Page 55: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/55.jpg)
@Braintree_Dev @SeraAndroid
>The Road Ahead
![Page 56: Expanding APIs beyond the Web](https://reader030.vdocument.in/reader030/viewer/2022032421/55a79a601a28ab1b6e8b4667/html5/thumbnails/56.jpg)
@Braintree_Dev @SeraAndroid
Thanks
developers.braintreepayments.com
slideshare.com/PayPal