24 / 7 support
1-800-913-4797

How can I authorize Salesforce CRM?

Salesforce authorization can be done in two ways, each of them has specific benefits.

Note: The role of the user influences on the sent API calls. It means that the abilities: create, view, edit, and delete records via API will be equal to the permissions granted to this very user.

1. oAuth authorization via Data2CRM.API app

During the oAuth authorization via Data2CRM.API app, you need to redirect the user to https://api-backend.api2crm.com/authorization/oauth/Salesforce/authorize?redirect=<redirect>. Here <redirect> stands for the address where we should drive the user back and transfer into URL hash the authorization parameters: instance_url, access_token, refresh_token.

After that, they can be used as the access credentials for Data2CRM.API system. That allows us to refresh the authorization parameters on our side by using refresh_token.

Example:

{

"type":"Salesforce",

"description": "Company CRM",

"authorization": "oAuth-internal",

"credential": [

{

"name": "instance_url",

"value": "https://eu6.salesforce.com/"

},

{

"name": "access_token",

"value": "00D36000000q00m!AQkAQPXIXS7l8s.FlAbu0St61eg1F4EiEpDnP7ProsEXI0_10oq2"

},

{

"name": "refresh_token",

"value": "5Aep8bHyftz0nI_C6W6g4LNvH.2xpDzo2YW5ZBxGkdHp0HRTkfcf3IjcaLQQv9UcwUJc"

}

]

}

    2. oAuth authorization via your app

    During this authorization, you need to receive the access parameters using https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_understanding_web_server_oauth_flow.htm" target="_blank">this instruction</a>: instance_url, access_token, refresh_token.

    After that, instance_url and access_token can be used as the access credentials for Data2CRM.API system.

    When the access_token expires, the system will give the authorization error, and then you will need to renew access_token by means of refresh_token. So make sure you have saved this token outside the system.

    When you get the new authorization parameters, you should update them in Data2CRM.API system. Use "Update application information" methods for that.

    Example:

    {

    "type":"Salesforce",

    "description": "Company CRM",

    "authorization": "oAuth-internal",

    "credential": [

    {

    "name": "instance_url",

    "value": "https://eu6.salesforce.com/"

    },

    {

    "name": "access_token",

    "value": "00D36000000q00m!AQkAQPXIXS7l8s.FlAbu0St61eg1F4EiEpDnP7ProsEXI0_10oq2"

    }

    ]

    }

    More questions are coming up?
    Feel free to contact our support team.

    Get Support

    Posted in: Salesforce

    ×

    Schedule a Call

    Data2CRM.API representative will contact you at any convenient for you time and offer industry insights, service functionality details and optimal value proposition to meet your goals.

    To continue using this website, you have to allow cookies in accordance with our Cookie Policy

    ×