orange apis as presented at mobile banking factory 2

69
Orange APIs Orange Partner MobileBankingFactory2 Challenge / Th Gaillet March 14, 2015

Upload: orange-partner

Post on 17-Jul-2015

530 views

Category:

Technology


2 download

TRANSCRIPT

Orange APIsOrange Partner

MobileBankingFactory2 Challenge / Th GailletMarch 14, 2015

Once upon a time…

Life has changed with Orange

244m customers 29 countries156k employees

600+ APIs

€39b sales

Orange APIsOrange Partner

Open Innovation

Cloud

API

M2MAPI

BeaconsAPI

Identity

API

Datavenue

APIs

Self-service

Go-to-market

Cloud

API

M2MAPI

BeaconsAPI

Identity

API

Datavenue

APIs

Orange M2M platform

Partner’splatform

Managed SIMs M2MAPI

Business Services

Fleet management partnership• Orange Fleet performance

• Peugeot Connect Fleet management

• Citroën Connect Fleet management

Cloud

API

M2MAPI

BeaconsAPI

Identity

API

Datavenue

APIs

B2B2C example, at the gym

> >

MarcoGymTech CTO

develops & manages solutions for multiple

gym clubs

PeterGym customer

expects the bestexperience, with relevant

interactions & privacy

JimGym manager

wants to boost hisbusiness & know his

customers better

> >

JimGym manager

wants to boost hisbusiness & know his

customers better

MarcoGymTech CTO

Orange Beacon

Beacons

mobile appsAPIs via

SDKs

Partner’sapp

Orange Beaconplatform

Partner’sportal

management & analyticsAPIs

Partner’s platforms

Partner

Orangeportal

Gym Manager

Orangeapp

Settings

Orange Beacon SDK

Orange Beacon SDK

Cloud

API

M2MAPI

BeaconsAPI

Identity

API

Datavenue

APIs

MarcoGymTech CTO

various gym equipments

new devices or pure S/W add-ons

< / >< / >

C, Java, etc.etc.

Orange

DatavenueAPIs

Marco,GymTech CTO

Datavenue portal

Access API

GymTech’s platforms

GymTech’s apps

Jim incontrol,as Gymmanager

Aggregation API

Other data

Store

Manage

Secure

other apps

other platforms

FutureSharing APIs

- Jim’s data, with his consent

- Anonymized data

3rd Party

< / > GymTech’s H/W + S/W

Collect APIPeter,the end-user

Cloud

API

M2MAPI

BeaconsAPI

Identity

API

Datavenue

APIs

…resources like Peter’s personalcloud

Marco developed a GymTech app…

…for end-userslike Peter

this app needs to access user’s resources…

IdentificationAuthorization

?

OAuth V2

Open IDConnect

Mobile Connect

Cloud

API

M2MAPI

BeaconsAPI

Identity

API

Datavenue

APIs

Peter Gym customer

GymTechCongratulations! All time record: 20 km in 1:20 h

Save this momentto your Orange Cloud

MarcoGymTech CTO

Orange Cloud

Partner’sapp

CloudAPI

IdentityAuthorization

Open ID Connect API User Details API

Client’spersonalcloud

Client’sdevices

CloudAPI

Partner’sbackend

Orange

Cloud

Uploader

#!/bin/bash # OrangeCloud_uploader.sh # … CLIENT_ID="gVZ0rd4zQDQ..a.dbP0iuWF" CLIENT_SECRET="R6zYmsIEgtSIMWIA" AUTHORIZATION=$(encodeBase64 $CLIENT_ID':'$CLIENT_SECRET) REFRESH_TOKEN="OFR-d8e439…92a1f7e4a7e1b9c812ba"

# File to upload FILE_NAME="weather.png" FILE_SIZE=$(stat -f%z « $FILE_NAME")

# [1] Obtain accessToken from refresh token response=$(curl -X POST \ -H 'Authorization:Basic '$AUTHORIZATION \ -H 'Content-Type:application/x-www-form-urlencoded' \ -d 'grant_type=refresh_token&refresh_token='$REFRESH_TOKEN \ https://api.orange.com/oauth/v2/token) if [[ $response =~ "error" ]]; then echo $(date '+%T')' get accessToken error: '$response exit -1 fi accessToken=$(jsonValue $response access_token)

Orange

Cloud

Uploader

# [2] Get $ESID (session ID) response=$(curl -X POST \ -H 'Authorization:Bearer '$accessToken \ -H 'Content-Length:0' \ https://api.orange.com/cloud/v1/session) if [[ $response =~ "error" ]]; then echo $(date '+%T')' get sessionId error: '$response exit -1 fi sessionID=$(jsonValue $response esid) # [3] Upload a file from current directory to end-user's cloud response=$(curl -k -S -X POST \ -H 'X-Orange-CA-ESID: '$sessionID \ -H 'Authorization: Bearer '$accessToken \ -F 'description={"name":"'$FILE_NAME'","size":'$FILE_SIZE'}' \ -F 'file=@'$FILE_NAME';filename='$FILE_NAME \ https://cloudapi.orange.com/cloud/v1/files/content) if [[ $response =~ "error" ]]; then echo $(date '+%T')' file upload error: '$response exit -1 fi fileID=$(jsonValue $response fileId) echo 'File successfully uploaded, with id: '$fileID

Orange

Cloud

SDK

// in main controller

- (void)viewDidLoad { [super viewDidLoad]; // Create the object that will make both user authentication // and cloud session management self.cloudSession = [[CloudSession alloc] initWithAppKey:@"yourClientId" appSecret:@"yourClientSecret" redirectURI:@"yourURIredirect"]; }

// in app delegate

- (void)applicationDidBecomeActive:(UIApplication *)application { [self.mainController connect]; }

// in main controller, how to connect:

- (void) connect { [self.cloudSession openSessionFrom:self success:^{ [self.cloudSession rootFolderWithSuccess:^(CloudItem * cloudItem) { [self setViewControllers:@[[[FileListViewController alloc] initWithSession:self.cloudSession

item:cloudItem]]]; } failure:^(CloudStatus status) { NSLog (@"Error while getting root folder"); }]; } failure:^(CloudStatus status) { NSLog (@"Error while connecting user"); }]; }

Orange

Cloud

SDK

GymTech

GymTech

informations que je partage avec GymTech

Cloud

API

M2MAPI

BeaconsAPI

Identity

API

Datavenue

APIs

Self-service APIs

Go-to-market

what it used to be

what it should be

Orange Services Mobile & webapps

End-users

Partners

API

orangepartner.com

Why are

we doingthis?

Orange Services Mobile & webapps

End-users

Partners

API

orangepartner.com

Next steps

WebinarStart

March 24 April 14

Webinar Coaching

Ad-hocMarch 14

Jury

May 19

thank you

orangepartner.com