Bearer logo

Quickly build your own Salesforce API Integration

  • Don’t waste time learning the SalesForce API behaviour
  • Use a pre-configured API client and OAuth2 implementation
  • Consume and transform the SalesForce API with functions
  • Host and scale your integration for free
  • Monitor and log every API call to the SalesForce API out of the box.
  • Integrate into your app within seconds using our integration clients
or read the documentation

As a developer, I want to build an integration on Salesforce

On Bearer

Clone the template

npm init bearer salesforce -t -d providers/salesforce
cd salesforce

Configure your API credentials

npm run bearer setup:auth
? Enter Salesforce Client ID:
? Enter Salesforce Client Secret:
Setup the integration with your Salesforce OAuth2 credentials. This will allow you to make authenticated API requests. Don't know your Salesforce OAuth2 credentials?

Test the pre-built function

npm run bearer invoke defaultFunction
{
  "data": {
    "tooling": "/services/data/v26.0/tooling",
    "eclair": "/services/data/v26.0/eclair",
    "folders": "/services/data/v26.0/folders",
    "prechatForms": "/services/data/v26.0/prechatForms",
    "dedupe": "/services/data/v26.0/dedupe",
    "async-queries": "/services/data/v26.0/async-queries",
    "query": "/services/data/v26.0/query",
    "chatter": "/services/data/v26.0/chatter",
    "wave": "/services/data/v26.0/wave",
    "iot": "/services/data/v26.0/iot",
    "search": "/services/data/v26.0/search",
    "identity": "https://login.salesforce.com/id/00D2p000000Pd0IEAS/0052p000008a0DqAAI",
    "sobjects": "/services/data/v26.0/sobjects",
    "serviceTemplates": "/services/data/v26.0/serviceTemplates",
    "recent": "/services/data/v26.0/recent",
    "connect": "/services/data/v26.0/connect",
    "licensing": "/services/data/v26.0/licensing"
  }
}

Code your own function

npm run bearer generate:function myFunction
create: functions/myFunction.ts
Function generated
✨ Done
Use your function to call any Salesforce endpoint and map the data to your app models.

Deploy your integration

npm run bearer push
Refreshing tokens... done
✓ Generate bundle
✓ Transfer bundle
🐻 Integration successfully pushed.
Once your integration is ready, deploy it on the Bearer platform and you’re good to go!
On Your App

Add a Connect Component

JSReact
<script src="https://cdn.jsdelivr.net/npm/@bearer/js/lib/bearer.production.min.js"></script>
<script>
const bearerClient = bearer('BEARER_CLIENT_ID')
bearerClient.connect(
'INTEGRATION_UUID',
'YOUR_SETUP_ID',
{ authId: 'YOUR_USER_IDENTIFIER' }
)
</script>
Once users log in with their Salesforce account, your functions are able to query the API using their credentials.

Call your functions

JSReactNodeJSRuby
<script src="https://cdn.jsdelivr.net/npm/@bearer/js/lib/bearer.production.min.js"></script>
<script>
const bearerClient = bearer('BEARER_CLIENT_ID')
bearerClient.invoke('INTEGRATION_UUID', 'FUNCTION_NAME', {
query: { params: 'value' }
})
.then(() => {
console.log('Successfully invoked function')
})
.catch(() => {
console.log('Something went wrong')
})
</script>
Use our integration clients to call your functions from your app.

Featured Templates

Bearer - API integration Framework

Product

Company

Docs & Help

Legal

Bearer is on TwitterBearer is on GitHubBearer is on FacebookBearer is on LinkedInBearer is on Medium
© Copyright Bearer 2019