SlideShare a Scribd company logo
1 of 19
BigCommerce App Development
Jumayel Islam
Building Apps with OAuth
● Public OAuth Apps (applications) can be listed in the App Marketplace for easy
installation in all BigCommerce stores.
● They use OAuth for token exchange during installation: The user installing the app
will approve the scopes for your app to access and/or modify their store’s data.
Monetizing Your App
● If you want to charge merchants for your app, please note that BigCommerce
expects you to handle the billing aspects of the transaction. Your app needs to take
care of collecting the fee from the merchant.
● Under the standard contract, within 30 days of collecting this revenue, you must
send BigCommerce 20% and retain the remaining 80% for yourself. Once your app
is published, a mandatory revenue-share reporting form will be sent to the primary
contact on your partner account, at the beginning of each month.
App Registration
● Once you have a sandbox store, you must register your app to get your Client ID
and Client Secret.
● The Client ID value uniquely identifies your app and you will need to pass it in the
header of all your requests to the Stores API.
● The Client Secret value is a secret that your app and BigCommerce share. You do
need to pass the Client Secret value once during the app installation sequence.
Thereafter, BigCommerce uses it to sign payloads in load, uninstall, and remove
user requests, and your app uses it to verify the signature to ensure that the
request is coming from BigCommerce.
Technical Prerequisites
Before you register your app, consider the required and optional steps below.
Auth Callback and Load Callback URIs
● You must have an Auth Callback URI and a Load Callback URI to register your app.
● Because the Auth Callback URI and Load Callback URI requests originate from the
browser and not from BigCommerce, you can use non–publicly-available URIs and
a self-signed certificate for a quick start. However, you must switch to – and test
your app with – a publicly available Auth Callback URI and Load Callback URI before
submitting your app for consideration in the App Store.
Technical Prerequisites(Cont.)
Uninstall Callback (Optional)
If you want to receive a callback when the store owner uninstalls your app, you can
provide an Uninstall Callback URI.
Technical Prerequisites(Cont.)
Requesting OAuth Scopes
If you know the OAuth scopes that your app requires, you should select these. If you do
not yet know the scopes that you need, you can just request minimal permissions (such
as Information: Read-Only) to get started. However, once you determine the scopes you
need, you must:
● Modify the scopes of your app in My Apps and save the changes.
● Obtain the new OAuth token during the App Installation or Update flow.
● Retest your app to make sure it still functions properly with the new token.
App installation and update sequence
App installation and update sequence (Cont.)
● Receiving the GET Request
● Responding to the GET Request
● Making the POST Request
● Receiving the POST Response
Receiving the GET Request
● The GET request to your Auth Callback URI contains a temporary code that you can exchange
for a permanent OAuth token. It also includes a unique value that identifies the store installing
or updating your app, as well as other values.
Receiving the GET Request(Cont.)
Parameters
Here, we discuss the details of the full list of parameters and values included in the GET request from BigCommerce
to your Auth Callback URI. BigCommerce passes these within the URI itself as query parameters.
● code: Temporary code to exchange for a permanent OAuth token.
● scope: List of scopes authorized by the user. As a best practice, your app should validate this list to ensure that
it matches the app’s needs, and fail if it does not. However, at this time, the user does not have any
opportunity to pick and choose between scopes. The dialog presented to the user requires the user to approve
all scopes or none.
● context: The store hash: a unique value that identifies the store on which a logged-in user has clicked to install
or your app. BigCommerce passes this along with a context path, as follows: stores/{store_hash}. Save the
store hash value, because you will need to pass it in all your requests to the Stores API.
Receiving the GET Request(Cont.)
Example – Initial Installation
This example initiates the token exchange, with a requested scope of store_v2_orders:
GET /auth?code=qr6h3thvbvag2ffq&scope=store_v2_orders&context=stores/g5cd38 HTTP/1.1
Host: app.example.com
(Note that when your app receives a new token, any previously issued token is invalidated.)
Responding to the GET Request
● Upon receiving the GET request at your Auth Callback URI, your app should return some HTML
to the merchant browser.
● BigCommerce renders this in an iframe inside of the control panel. It could be a form that
collects further information from the user, or you could redirect the user to your app’s main
page.
Making the POST Request
● The POST request’s primary purpose is to exchange the temporary access code for a
permanent OAuth token. However, your app must pass a number of additional values to
accomplish the exchange. Pass the parameters and their values inside the request body, using
query parameters and URL-encoding. To achieve this, you must include the following HTTP
header:
Content-Type: application/x-www-form-urlencoded
● Make the POST request to the following address:
https://login.bigcommerce.com/oauth2/token
Making the POST Request(Cont.)
Parameters
Include values for each of the following parameters.
client_id: The Client ID for your app, obtained during registration.
client_secret: The Client Secret for your app, obtained during registration.
code: Temporary access code received in the GET request discussed above.
scope: List of OAuth scopes received in the GET request discussed above.
grant_type: Always use the following: authorization_code.
redirect_uri: Must be identical to your registered Auth Callback URI.
context: The store hash received in the GET request, in the format: stores/{_store_hash_}
Making the POST Request(Cont.)
POST /oauth2/token HTTP/1.1
Host: login.bigcommerce.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 186
client_id={CLIENT_ID}&client_secret={CLIENT_SECRET}&code=qr6h3thvbvag2ffq&scope=store_v2_ord
ers&grant_type=authorization_code&redirect_uri=https://app.example.com/oauth&context=stores/{
STORE_HASH}
Receiving the POST Response
The POST response will include a JSON object containing the permanent OAuth token, user
information, and other values. Upon receiving the permanent OAuth token, store it securely. You
should also store the user and store hash values, to identify the user and store at load and uninstall.
The following sections detail the contents of the JSON body.
access_token: The permanent OAuth token that your app can use to make requests to the Stores
API on behalf of the user. Store this value securely.
scope: List of authorization scopes.
id: Unique identifier for the user. Store this value to identify the user at load and uninstall.
email: The user’s email address. Store this value to identify the user at load and uninstall.
context: The store hash, as well as a base path: stores/{_store_hash_}
API Request Example(Ruby on Rails)
connection = Bigcommerce::Connection.build(
Bigcommerce::Config.new(
store_hash: ENV['BC_STORE_HASH'],
client_id: ENV['BC_CLIENT_ID'],
access_token: ENV['BC_ACCESS_TOKEN']
)
)
Bigcommerce::System.time(connection: connection)
=> #<Bigcommerce::System time=1466546702>
Reference
https://developer.bigcommerce.com/api/

More Related Content

Similar to Big commerce app development

I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop
I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop
I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop Apigee | Google Cloud
 
Deep Dive into OAuth for Connected Apps
Deep Dive into OAuth for Connected AppsDeep Dive into OAuth for Connected Apps
Deep Dive into OAuth for Connected AppsSalesforce Developers
 
Microservice security with spring security 5.1,Oauth 2.0 and open id connect
Microservice security with spring security 5.1,Oauth 2.0 and open id connect Microservice security with spring security 5.1,Oauth 2.0 and open id connect
Microservice security with spring security 5.1,Oauth 2.0 and open id connect Nilanjan Roy
 
API Product Management and Strategy
API Product Management and StrategyAPI Product Management and Strategy
API Product Management and Strategyadritab
 
How to build Simple yet powerful API.pptx
How to build Simple yet powerful API.pptxHow to build Simple yet powerful API.pptx
How to build Simple yet powerful API.pptxChanna Ly
 
Build and graduate your app in ring central
Build and graduate your app in ring centralBuild and graduate your app in ring central
Build and graduate your app in ring centralAnirban Sen Chowdhary
 
Deep dive into Salesforce Connected App
Deep dive into Salesforce Connected AppDeep dive into Salesforce Connected App
Deep dive into Salesforce Connected AppDhanik Sahni
 
Mulesoft Salesforce Connector - OAuth 2.0 JWT Bearer
Mulesoft Salesforce Connector -  OAuth 2.0 JWT BearerMulesoft Salesforce Connector -  OAuth 2.0 JWT Bearer
Mulesoft Salesforce Connector - OAuth 2.0 JWT BearerVince Soliza
 
Setting up organization with api access
Setting up organization with api accessSetting up organization with api access
Setting up organization with api accesssivachandra mandalapu
 
MuleSoft Integration with WhatsApp | Mysore MuleSoft Meetup #1
MuleSoft Integration with WhatsApp | Mysore MuleSoft Meetup #1MuleSoft Integration with WhatsApp | Mysore MuleSoft Meetup #1
MuleSoft Integration with WhatsApp | Mysore MuleSoft Meetup #1MysoreMuleSoftMeetup
 
Best selling extension on sun cart
Best selling extension on sun cartBest selling extension on sun cart
Best selling extension on sun cartSunCart Store
 
Microsoft Graph API Delegated Permissions
Microsoft Graph API Delegated PermissionsMicrosoft Graph API Delegated Permissions
Microsoft Graph API Delegated PermissionsStefan Weber
 
Jet.com Woocommerce Integration Extension, Sell Your Store Products on Jet.com
Jet.com Woocommerce Integration Extension, Sell Your Store Products on Jet.comJet.com Woocommerce Integration Extension, Sell Your Store Products on Jet.com
Jet.com Woocommerce Integration Extension, Sell Your Store Products on Jet.comCedCommerce
 
O2C_user_manual
O2C_user_manualO2C_user_manual
O2C_user_manualkhasnabis
 
Resume_YasirGhauri_HOD
Resume_YasirGhauri_HODResume_YasirGhauri_HOD
Resume_YasirGhauri_HODYasir Ghauri
 
Self checkout application presentation
Self checkout application presentationSelf checkout application presentation
Self checkout application presentationAshwinBicholiya
 

Similar to Big commerce app development (20)

I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop
I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop
I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop
 
OAuth2 primer
OAuth2 primerOAuth2 primer
OAuth2 primer
 
OAuth 2.0
OAuth 2.0OAuth 2.0
OAuth 2.0
 
Deep Dive into OAuth for Connected Apps
Deep Dive into OAuth for Connected AppsDeep Dive into OAuth for Connected Apps
Deep Dive into OAuth for Connected Apps
 
Microservice security with spring security 5.1,Oauth 2.0 and open id connect
Microservice security with spring security 5.1,Oauth 2.0 and open id connect Microservice security with spring security 5.1,Oauth 2.0 and open id connect
Microservice security with spring security 5.1,Oauth 2.0 and open id connect
 
API Product Management and Strategy
API Product Management and StrategyAPI Product Management and Strategy
API Product Management and Strategy
 
Securing api with_o_auth2
Securing api with_o_auth2Securing api with_o_auth2
Securing api with_o_auth2
 
How to build Simple yet powerful API.pptx
How to build Simple yet powerful API.pptxHow to build Simple yet powerful API.pptx
How to build Simple yet powerful API.pptx
 
Build and graduate your app in ring central
Build and graduate your app in ring centralBuild and graduate your app in ring central
Build and graduate your app in ring central
 
Deep dive into Salesforce Connected App
Deep dive into Salesforce Connected AppDeep dive into Salesforce Connected App
Deep dive into Salesforce Connected App
 
Mulesoft Salesforce Connector - OAuth 2.0 JWT Bearer
Mulesoft Salesforce Connector -  OAuth 2.0 JWT BearerMulesoft Salesforce Connector -  OAuth 2.0 JWT Bearer
Mulesoft Salesforce Connector - OAuth 2.0 JWT Bearer
 
Setting up organization with api access
Setting up organization with api accessSetting up organization with api access
Setting up organization with api access
 
MuleSoft Integration with WhatsApp | Mysore MuleSoft Meetup #1
MuleSoft Integration with WhatsApp | Mysore MuleSoft Meetup #1MuleSoft Integration with WhatsApp | Mysore MuleSoft Meetup #1
MuleSoft Integration with WhatsApp | Mysore MuleSoft Meetup #1
 
Best selling extension on sun cart
Best selling extension on sun cartBest selling extension on sun cart
Best selling extension on sun cart
 
Microsoft Graph API Delegated Permissions
Microsoft Graph API Delegated PermissionsMicrosoft Graph API Delegated Permissions
Microsoft Graph API Delegated Permissions
 
Jet.com Woocommerce Integration Extension, Sell Your Store Products on Jet.com
Jet.com Woocommerce Integration Extension, Sell Your Store Products on Jet.comJet.com Woocommerce Integration Extension, Sell Your Store Products on Jet.com
Jet.com Woocommerce Integration Extension, Sell Your Store Products on Jet.com
 
O2C_user_manual
O2C_user_manualO2C_user_manual
O2C_user_manual
 
Resume_YasirGhauri_HOD
Resume_YasirGhauri_HODResume_YasirGhauri_HOD
Resume_YasirGhauri_HOD
 
Self checkout application presentation
Self checkout application presentationSelf checkout application presentation
Self checkout application presentation
 
E Market Place
E Market PlaceE Market Place
E Market Place
 

More from Nascenia IT

Introduction to basic data analytics tools
Introduction to basic data analytics toolsIntroduction to basic data analytics tools
Introduction to basic data analytics toolsNascenia IT
 
Communication workshop in nascenia
Communication workshop in nasceniaCommunication workshop in nascenia
Communication workshop in nasceniaNascenia IT
 
The Art of Statistical Deception
The Art of Statistical DeceptionThe Art of Statistical Deception
The Art of Statistical DeceptionNascenia IT
 
করোনায় কী করি!
করোনায় কী করি!করোনায় কী করি!
করোনায় কী করি!Nascenia IT
 
GDPR compliance expectations from the development team
GDPR compliance expectations from the development teamGDPR compliance expectations from the development team
GDPR compliance expectations from the development teamNascenia IT
 
Writing Clean Code
Writing Clean CodeWriting Clean Code
Writing Clean CodeNascenia IT
 
History & Introduction of Neural Network and use of it in Computer Vision
History & Introduction of Neural Network and use of it in Computer VisionHistory & Introduction of Neural Network and use of it in Computer Vision
History & Introduction of Neural Network and use of it in Computer VisionNascenia IT
 
Ruby on Rails: Coding Guideline
Ruby on Rails: Coding GuidelineRuby on Rails: Coding Guideline
Ruby on Rails: Coding GuidelineNascenia IT
 
iphone 11 new features
iphone 11 new featuresiphone 11 new features
iphone 11 new featuresNascenia IT
 
Software quality assurance and cyber security
Software quality assurance and cyber securitySoftware quality assurance and cyber security
Software quality assurance and cyber securityNascenia IT
 
Job Market Scenario For Freshers
Job Market Scenario For Freshers Job Market Scenario For Freshers
Job Market Scenario For Freshers Nascenia IT
 
Modern Frontend Technologies (BEM, Retina)
Modern Frontend Technologies (BEM, Retina)Modern Frontend Technologies (BEM, Retina)
Modern Frontend Technologies (BEM, Retina)Nascenia IT
 
CSS for Developers
CSS for DevelopersCSS for Developers
CSS for DevelopersNascenia IT
 
Integrating QuickBooks Desktop with Rails Application
Integrating QuickBooks Desktop with Rails ApplicationIntegrating QuickBooks Desktop with Rails Application
Integrating QuickBooks Desktop with Rails ApplicationNascenia IT
 
TypeScript: Basic Features and Compilation Guide
TypeScript: Basic Features and Compilation GuideTypeScript: Basic Features and Compilation Guide
TypeScript: Basic Features and Compilation GuideNascenia IT
 
Ruby conf 2016 - Secrets of Testing Rails 5 Apps
Ruby conf 2016 - Secrets of Testing Rails 5 AppsRuby conf 2016 - Secrets of Testing Rails 5 Apps
Ruby conf 2016 - Secrets of Testing Rails 5 AppsNascenia IT
 
COREXIT: Microsoft’s new cross platform framework
COREXIT: Microsoft’s new cross platform frameworkCOREXIT: Microsoft’s new cross platform framework
COREXIT: Microsoft’s new cross platform frameworkNascenia IT
 
An overview on the Reddot Ruby Conf 2016, Singapore
An overview on the Reddot Ruby Conf 2016, SingaporeAn overview on the Reddot Ruby Conf 2016, Singapore
An overview on the Reddot Ruby Conf 2016, SingaporeNascenia IT
 
Software Quality Assurance: A mind game between you and devil
Software Quality Assurance: A mind game between you and devilSoftware Quality Assurance: A mind game between you and devil
Software Quality Assurance: A mind game between you and devilNascenia IT
 

More from Nascenia IT (20)

Introduction to basic data analytics tools
Introduction to basic data analytics toolsIntroduction to basic data analytics tools
Introduction to basic data analytics tools
 
Communication workshop in nascenia
Communication workshop in nasceniaCommunication workshop in nascenia
Communication workshop in nascenia
 
The Art of Statistical Deception
The Art of Statistical DeceptionThe Art of Statistical Deception
The Art of Statistical Deception
 
করোনায় কী করি!
করোনায় কী করি!করোনায় কী করি!
করোনায় কী করি!
 
GDPR compliance expectations from the development team
GDPR compliance expectations from the development teamGDPR compliance expectations from the development team
GDPR compliance expectations from the development team
 
Writing Clean Code
Writing Clean CodeWriting Clean Code
Writing Clean Code
 
History & Introduction of Neural Network and use of it in Computer Vision
History & Introduction of Neural Network and use of it in Computer VisionHistory & Introduction of Neural Network and use of it in Computer Vision
History & Introduction of Neural Network and use of it in Computer Vision
 
Ruby on Rails: Coding Guideline
Ruby on Rails: Coding GuidelineRuby on Rails: Coding Guideline
Ruby on Rails: Coding Guideline
 
iphone 11 new features
iphone 11 new featuresiphone 11 new features
iphone 11 new features
 
Software quality assurance and cyber security
Software quality assurance and cyber securitySoftware quality assurance and cyber security
Software quality assurance and cyber security
 
Job Market Scenario For Freshers
Job Market Scenario For Freshers Job Market Scenario For Freshers
Job Market Scenario For Freshers
 
Modern Frontend Technologies (BEM, Retina)
Modern Frontend Technologies (BEM, Retina)Modern Frontend Technologies (BEM, Retina)
Modern Frontend Technologies (BEM, Retina)
 
CSS for Developers
CSS for DevelopersCSS for Developers
CSS for Developers
 
Integrating QuickBooks Desktop with Rails Application
Integrating QuickBooks Desktop with Rails ApplicationIntegrating QuickBooks Desktop with Rails Application
Integrating QuickBooks Desktop with Rails Application
 
TypeScript: Basic Features and Compilation Guide
TypeScript: Basic Features and Compilation GuideTypeScript: Basic Features and Compilation Guide
TypeScript: Basic Features and Compilation Guide
 
Clean code
Clean codeClean code
Clean code
 
Ruby conf 2016 - Secrets of Testing Rails 5 Apps
Ruby conf 2016 - Secrets of Testing Rails 5 AppsRuby conf 2016 - Secrets of Testing Rails 5 Apps
Ruby conf 2016 - Secrets of Testing Rails 5 Apps
 
COREXIT: Microsoft’s new cross platform framework
COREXIT: Microsoft’s new cross platform frameworkCOREXIT: Microsoft’s new cross platform framework
COREXIT: Microsoft’s new cross platform framework
 
An overview on the Reddot Ruby Conf 2016, Singapore
An overview on the Reddot Ruby Conf 2016, SingaporeAn overview on the Reddot Ruby Conf 2016, Singapore
An overview on the Reddot Ruby Conf 2016, Singapore
 
Software Quality Assurance: A mind game between you and devil
Software Quality Assurance: A mind game between you and devilSoftware Quality Assurance: A mind game between you and devil
Software Quality Assurance: A mind game between you and devil
 

Recently uploaded

Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 

Recently uploaded (20)

Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 

Big commerce app development

  • 2. Building Apps with OAuth ● Public OAuth Apps (applications) can be listed in the App Marketplace for easy installation in all BigCommerce stores. ● They use OAuth for token exchange during installation: The user installing the app will approve the scopes for your app to access and/or modify their store’s data.
  • 3. Monetizing Your App ● If you want to charge merchants for your app, please note that BigCommerce expects you to handle the billing aspects of the transaction. Your app needs to take care of collecting the fee from the merchant. ● Under the standard contract, within 30 days of collecting this revenue, you must send BigCommerce 20% and retain the remaining 80% for yourself. Once your app is published, a mandatory revenue-share reporting form will be sent to the primary contact on your partner account, at the beginning of each month.
  • 4. App Registration ● Once you have a sandbox store, you must register your app to get your Client ID and Client Secret. ● The Client ID value uniquely identifies your app and you will need to pass it in the header of all your requests to the Stores API. ● The Client Secret value is a secret that your app and BigCommerce share. You do need to pass the Client Secret value once during the app installation sequence. Thereafter, BigCommerce uses it to sign payloads in load, uninstall, and remove user requests, and your app uses it to verify the signature to ensure that the request is coming from BigCommerce.
  • 5. Technical Prerequisites Before you register your app, consider the required and optional steps below. Auth Callback and Load Callback URIs ● You must have an Auth Callback URI and a Load Callback URI to register your app. ● Because the Auth Callback URI and Load Callback URI requests originate from the browser and not from BigCommerce, you can use non–publicly-available URIs and a self-signed certificate for a quick start. However, you must switch to – and test your app with – a publicly available Auth Callback URI and Load Callback URI before submitting your app for consideration in the App Store.
  • 6. Technical Prerequisites(Cont.) Uninstall Callback (Optional) If you want to receive a callback when the store owner uninstalls your app, you can provide an Uninstall Callback URI.
  • 7. Technical Prerequisites(Cont.) Requesting OAuth Scopes If you know the OAuth scopes that your app requires, you should select these. If you do not yet know the scopes that you need, you can just request minimal permissions (such as Information: Read-Only) to get started. However, once you determine the scopes you need, you must: ● Modify the scopes of your app in My Apps and save the changes. ● Obtain the new OAuth token during the App Installation or Update flow. ● Retest your app to make sure it still functions properly with the new token.
  • 8. App installation and update sequence
  • 9. App installation and update sequence (Cont.) ● Receiving the GET Request ● Responding to the GET Request ● Making the POST Request ● Receiving the POST Response
  • 10. Receiving the GET Request ● The GET request to your Auth Callback URI contains a temporary code that you can exchange for a permanent OAuth token. It also includes a unique value that identifies the store installing or updating your app, as well as other values.
  • 11. Receiving the GET Request(Cont.) Parameters Here, we discuss the details of the full list of parameters and values included in the GET request from BigCommerce to your Auth Callback URI. BigCommerce passes these within the URI itself as query parameters. ● code: Temporary code to exchange for a permanent OAuth token. ● scope: List of scopes authorized by the user. As a best practice, your app should validate this list to ensure that it matches the app’s needs, and fail if it does not. However, at this time, the user does not have any opportunity to pick and choose between scopes. The dialog presented to the user requires the user to approve all scopes or none. ● context: The store hash: a unique value that identifies the store on which a logged-in user has clicked to install or your app. BigCommerce passes this along with a context path, as follows: stores/{store_hash}. Save the store hash value, because you will need to pass it in all your requests to the Stores API.
  • 12. Receiving the GET Request(Cont.) Example – Initial Installation This example initiates the token exchange, with a requested scope of store_v2_orders: GET /auth?code=qr6h3thvbvag2ffq&scope=store_v2_orders&context=stores/g5cd38 HTTP/1.1 Host: app.example.com (Note that when your app receives a new token, any previously issued token is invalidated.)
  • 13. Responding to the GET Request ● Upon receiving the GET request at your Auth Callback URI, your app should return some HTML to the merchant browser. ● BigCommerce renders this in an iframe inside of the control panel. It could be a form that collects further information from the user, or you could redirect the user to your app’s main page.
  • 14. Making the POST Request ● The POST request’s primary purpose is to exchange the temporary access code for a permanent OAuth token. However, your app must pass a number of additional values to accomplish the exchange. Pass the parameters and their values inside the request body, using query parameters and URL-encoding. To achieve this, you must include the following HTTP header: Content-Type: application/x-www-form-urlencoded ● Make the POST request to the following address: https://login.bigcommerce.com/oauth2/token
  • 15. Making the POST Request(Cont.) Parameters Include values for each of the following parameters. client_id: The Client ID for your app, obtained during registration. client_secret: The Client Secret for your app, obtained during registration. code: Temporary access code received in the GET request discussed above. scope: List of OAuth scopes received in the GET request discussed above. grant_type: Always use the following: authorization_code. redirect_uri: Must be identical to your registered Auth Callback URI. context: The store hash received in the GET request, in the format: stores/{_store_hash_}
  • 16. Making the POST Request(Cont.) POST /oauth2/token HTTP/1.1 Host: login.bigcommerce.com Content-Type: application/x-www-form-urlencoded Content-Length: 186 client_id={CLIENT_ID}&client_secret={CLIENT_SECRET}&code=qr6h3thvbvag2ffq&scope=store_v2_ord ers&grant_type=authorization_code&redirect_uri=https://app.example.com/oauth&context=stores/{ STORE_HASH}
  • 17. Receiving the POST Response The POST response will include a JSON object containing the permanent OAuth token, user information, and other values. Upon receiving the permanent OAuth token, store it securely. You should also store the user and store hash values, to identify the user and store at load and uninstall. The following sections detail the contents of the JSON body. access_token: The permanent OAuth token that your app can use to make requests to the Stores API on behalf of the user. Store this value securely. scope: List of authorization scopes. id: Unique identifier for the user. Store this value to identify the user at load and uninstall. email: The user’s email address. Store this value to identify the user at load and uninstall. context: The store hash, as well as a base path: stores/{_store_hash_}
  • 18. API Request Example(Ruby on Rails) connection = Bigcommerce::Connection.build( Bigcommerce::Config.new( store_hash: ENV['BC_STORE_HASH'], client_id: ENV['BC_CLIENT_ID'], access_token: ENV['BC_ACCESS_TOKEN'] ) ) Bigcommerce::System.time(connection: connection) => #<Bigcommerce::System time=1466546702>