MarketplaceMarketplace
40Processes
1405Downloads
toggle menu
Salesforce - OAuth 2.0
CRM/ERP Integration
0
1648
13
0
Salesforce - Getting access token
Additional information
Version:
 2
Create:
 May 31, 2017
Update:
 May 31, 2017
Click to rate:

OAuth 2.0

Register in developer's community Force.com.

Go to the first page of settings

Create a linked application:

  • Fill out forms: Name of linked application, Contact email address
  • Next to Enable OAuth parameters add "tick"
  • In Callback URL-address field, add callback URL of your applications
  • In OAuth selected areas add all available
  • Press Save

You will get client_id (user key) and client_secret (user's secret).

Authorization code receiving

In order to receive authorization code, add request to address bar of the browser and follow the link:

https://login.salesforce.com/services/oauth2/authorize?response_type=code&client_id={{client_id}}&redirect_uri={{callback_url}}

where,

{{client_id}} - user key of your application

{{callback_url}} - callback URL of your application

For example,

https://login.salesforce.com/services/oauth2/authorize?response_type=code&client_id=
3MVG9lKcPoNINVBIPJjdw1J9LLM82HnFVVX19KY1uA5mu0QqEWhqKpoW3svG3XHrXDiCQjK1mdgAvhCscA
9GE&redirect_uri=https://www.mysite.com

User who confirmed access, is redirected to URL specified in redirect_url parameter with authorization code value in request string.

For example,

https://www.mysite.com/code_callback.jsp?code=aPrxsmIEeqM9&state=mystate

The user who confirmed the right to access at least once, will not have to confirm this right again.

Receiving access_token OAuth 2.0

Click Use this process" and template of process "OAuth 2.0"** will copy to your environment.

Run the Get token process

For this:

  • Go to Debug mode

  • press Add task button.

  • in appeared window, specify required parameters:

    • callback_url - callback URL of your application
    • client_id - user key of your application
    • client_secret - user's secret of your key
    • code - authorization code , received in browser
  • after all parameters are specified, press Send task button.

Using access_token OAuth 2.0

In "Salesforce" folder there's Get token process located and state diagram Token storage.

Get token receives access_token and transfers it to the "Token storage" state diagram.

Token storage keeps access_token, which allows to receive it from other processes using construction:

    {{conv[{{diag_id}}].ref[token].token}}

where, diag_id - your state diagram id. For example,

    {{conv[140897].ref[token].token}}

To receive state diagram ID, click on its start node.

All system information will be available in the right side bar.

To make sure that access_token is received, go to Debug mode of state diagram Token storage

Press Tasks archive of token node

You will see a received token inside of request.

Read more

Similar processes

Bitrix OAuth
Bitrix OAuth
CRM/ERP Integration
0
FREE
1881
31
0
Payment Calendar
Payment Calendar
CRM/ERP Integration
0
FREE
1305
16
0
Binotel
Binotel
CRM/ERP Integration
1
FREE
3433
29
0
Bitrix New lead creation
Bitrix New lead creation
CRM/ERP Integration
0
FREE
1638
26
0
AWSAuth
AWSAuth
CRM/ERP Integration
0
FREE
1594
31
0
Brightpearl & Shopify
Brightpearl & Shopify
CRM/ERP Integration
0
FREE
1762
4
0
2025 © Corezoid.com. Middleware Inc., 541 Jefferson Avenue, Suite 100, Redwood City, CA 94063. All rights reserved. Patent protected. Powered by Erlang | Terms & Conditions