Your SlideShare is downloading. ×
API-Driven Relationships: Building The Trans-Internet Express of the Future
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.

Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

API-Driven Relationships: Building The Trans-Internet Express of the Future


Published on

Presented at IRM Summit, June 4 2014. Abstract: …

Presented at IRM Summit, June 4 2014. Abstract:

Move over Thomas the Tank Engine! If developers are the train conductors of the railway, then APIs
are the bullet trains of the future. In this session, Pat Patterson will explain how identity allows API
ecosystems to flourish, enabling developers to build ever more elaborate integrations. Whether it be
ExactTarget, Minecraft, or other great services, APIs are the basis for empowering developers to build
boundary-less railways across the web. ALLLLLL ABOOOOOOOOOAAAARD!

Published in: Software, Technology

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

No notes for slide


  • 1. API-Driven Relationships Building The Trans-Internet Express of the Future Pat Patterson Developer Evangelist Architect @metadaddy
  • 2. Apps Image used under CC-BY-SA. Attribution: SeeSchloss on APIs Image used under CC-BY-SA. Attribution: Daniel Schwen on Identity Image used under CC-BY-SA. Attribution: Arne Hückelheim on
  • 3. Integrating Issues from GitHub into Salesforce1 •I’m tracking support cases in Service Cloud •Some of my products are also open source projects •I want to… –link Service Cloud Case records to GitHub Issues –manage links from the Salesforce1 Mobile App
  • 4. Salesforce1 Mobile App Run Your Business From Your Phone • Mobile access to data in Salesforce – Accounts, Contacts, Cases etc – Custom Objects • Extension points for customization – PublisherActions – CustomApps Containerization Image used under CC-BY-SA. Attribution: Simeon87 on
  • 5. GitHub API •Resources: –Repositories, issues, comments, file contents etc –Hyperlinked •Authentication: –None –Basic –OAuth 2.0 REST
  • 6. GitHub API Example call $curl { "login": "metadaddy-sfdc", "id":723517, "avatar_url": "", "gravatar_id": "19573811373a51e4d063f9be63a5ac7c", "url":"", "html_url": "", "followers_url": "", "following_url": "{/other_user}", "repos_url":"", "type": "User", "name":"Pat Patterson", "company": "", "location": "SanFrancisco, CA", "bio":"Principal Developer Evangelist at", "public_repos": 55, "public_gists": 31, }
  • 7. Issues in GitHub ‘Single-page app’ built with Ionic Framework and AngularJS • Custom ‘GitHub URL’ field on Salesforce Case object • Custom ‘GitHub token’field on Salesforce User object • Login to GitHub via OAuth 2.0 • Pull my open Issues via GitHubAPI • Set value of GitHub URL field on Case
  • 8. Demo Issues in GitHub
  • 9. Automating Salesforce ExactTarget Marketing Cloud • I use ExactTarget for email marketing • My users log in to a community site via Facebook and other social providers • I want to… – automatically add new users to ExactTarget – send new users a personalized welcome email Double Header Image used under CC-BY. Attribution: chief_huddleston on Flickr
  • 10. ExactTarget APIs Authentication – App-to-App • Request POST/v1/requestToken Content-type: application/json { "clientSecret":"jY3CejwqkeqhelkqweetMKh", "clientId":"qew7rehjlrhlehrlwerwbfbfh49w” } • Response { "accessToken":"uuqxk7rf5f7ddpy7f5f4m74u", "expiresIn":3550 }
  • 11. ExactTarget APIs Web Service (SOAP) • Manage Subscribers, Lists, Campaigns etc <s:Envelopexmlns:s="" xmlns:a="" xmlns:u=""> <s:Header> <a:Actions:mustUnderstand="1">Create</a:Action> <a:Tos:mustUnderstand="1"></a:To> <ns1:fueloauthxmlns:ns1="">uuqxk7rf5f7ddpy7f5f4m74u</ns1:fueloauth> </s:Header> <s:Bodyxmlns:xsi="" xmlns:xsd=""> <CreateRequestxmlns=""> <Objectsxsi:type="Subscriber"> <EmailAddress></EmailAddress> <SubscriberKey></SubscriberKey> </Objects> </CreateRequest> </s:Body> </s:Envelope> Image used under CC-BY-SA. Attribution: François Melchior on SOAP
  • 12. ExactTarget APIs Fuel API (REST) • Trigger events, send SMS, mobile app notifications POST/interaction-experimental/v1/events Authorization: Bearer uuqxk7rf5f7ddpy7f5f4m74u Content-type: application/json { "ContactKey": "", "Data": { "Facebook_ID__c": "100001234567890", "First_Name__c": ”Demo", "Last_Name__c": ”User", "Locale__c": "en_US", "User_Email__c": "" }, "EventDefinitionKey": "Facebook-User-c-trigger" } REST Image used under CC-BY-SA. Attribution: Daniel Schwen on
  • 13. Demo Communities / ExactTarget Integration
  • 14. Visualizing Business Data… in Minecraft • I build Minecraft mods with my kids • I want to see data from Salesforce in a Minecraft world Image used under CC-BY. Attribution: Rklawton on Fun!
  • 15. Salesforce Identity OAuth 2.0 (Resource Owner Password Credentials Grant) • Request POST/services/oauth2/token Content-type:application/x-www-form-urlencoded grant_type=password&client_id=3MV...&client_secret=123...& • Response { "id":"", "issued_at":"1296509381665", "instance_url":"", "signature":"+Nbl5EOl/DlsvUZ4NbGDno6vn935XsWGVbwoKyXHayo=", "access_token":"00D50000000IZ3Z!AQgAQH0Yd9M51BU_rayzAdmZ6NmT3pXZ1kTuuQPljJVsX4CPt3naL7qustlb" }
  • 16. Salesforce1 Platform REST API • Queries – SOQLor SOSL query passed as URLparameter • /services/data/v29.0/query?q=SELECT+Id,+Name+FROM+Account… • Resources – Object types and records in database • /services/data/v29.0/sobjects/ • /services/data/v29.0/sobjects/Account/ • /services/data/v29.0/sobjects/Account/001i000000b64Rw
  • 17. Salesforce1 Platform Streaming API • Bayeux wire protocol – HTTP Long Polling • CometD Client Libraries client = new BayeuxClient(salesforceStreamingEndpoint(endpoint), transport); ... client.getChannel(OPPORTUNITY_CHANNEL).subscribe(new OpportunityListener()); ... public class OpportunityListener implements MessageListener { public void onMessage(ClientSessionChannel channel, Message message) { } }
  • 18. Demo Forcecraft
  • 19. Just as standard rail gauge and couplings allowed the railways to flourish, identity standards such as OAuth 2.0 and OpenID Connect, and standard API patterns such as REST, allow us to build the Trans-Internet Express of the future.