{"id":4241,"date":"2018-06-29T12:59:37","date_gmt":"2018-06-29T12:59:37","guid":{"rendered":"https:\/\/zappysys.com\/blog\/?p=4241"},"modified":"2021-12-27T20:33:01","modified_gmt":"2021-12-27T20:33:01","slug":"how-to-call-salesforce-rest-api-via-odbc-driver","status":"publish","type":"post","link":"https:\/\/zappysys.com\/blog\/how-to-call-salesforce-rest-api-via-odbc-driver\/","title":{"rendered":"How to call Salesforce REST API via ODBC driver"},"content":{"rendered":"<h2><span id=\"Prerequisites\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1764 alignleft\" src=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/09\/salesforce-logo-180x180.png\" alt=\"\" width=\"180\" height=\"180\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/09\/salesforce-logo-180x180.png 180w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/09\/salesforce-logo-180x180-150x150.png 150w\" sizes=\"(max-width: 180px) 100vw, 180px\" \/>Introduction<\/span><\/h2>\n<p><a href=\"https:\/\/www.salesforce.com\/\" target=\"_blank\" rel=\"noopener\">Salesforce<\/a>\u00a0is a popular CRM tool that lets you manage your sales, contacts, products, and other useful things. In this tutorial, you will learn how to call Salesforce REST API via ODBC driver using\u00a0<a href=\"https:\/\/zappysys.com\/products\/odbc-powerpack\/\" target=\"_blank\" rel=\"noopener\">ZappySys JSON Driver<\/a>. You can also use \u00a0<a href=\"https:\/\/zappysys.com\/products\/odbc-powerpack\/salesforce-odbc-driver\/\" target=\"_blank\" rel=\"noopener\">ZappySys Salesforce Driver<\/a> for salesforce data read \/ write but this article covers more more generic API calling usecase.<\/p>\n<p>You will find out how to register a <em>Connected App<\/em> in Salesforce, set OAuth authentication and use it for data retrieval. We will cover a topic of how to load leads from Salesforce and use them virtually in any application which supports ODBC. We will not stop with that and touch a possibility of calling any method of any REST API-based Salesforce API; be it insert or simple retrieval.<\/p>\n<h2><span id=\"Prerequisites\">Prerequisites<\/span><\/h2>\n<p>Make sure you meet these requirements:<\/p>\n<ol>\n<li><a href=\"https:\/\/zappysys.com\/products\/odbc-powerpack\/\" target=\"_blank\" rel=\"noopener\">ZappySys ODBC PowerPack<\/a>\u00a0installed.<\/li>\n<li>Have a registered, working Salesforce account.<\/li>\n<\/ol>\n<h2><\/h2>\n<h2><span id=\"Step-by-Step_Get_data_from_HubSpot_API_into_SQL_Server_database\"><span id=\"Step-By-StepGet_data_from_HubSpot_REST_API\"><span id=\"Step-By-Step_8211_Call_Amazon_MWS_API_using_SSIS\">Register Salesforce App (for OAuth)\u00a0<\/span><\/span><\/span><\/h2>\n<div class=\"content_block\" id=\"custom_post_widget-9476\">In this section, we will discuss how to register OAuth App to call Salesforce API using Client ID \/ Secret rather than using your User Id \/ Password.\r\n\r\nOnce you follow these steps below to register your Salesforce App (OAuth App), at the end you will get a Client ID (sometimes referred to as App Id) and Client Secret (or App Secret). These two pieces can be used later on to call Salesforce API using OAuth.\r\n\r\nSo let's get started.\r\n<h3>Register Salesforce App (OAuth)<\/h3>\r\n<ol>\r\n \t<li>Login into your account and go to <strong><em>Setup<\/em> <\/strong>as shown below (click on gear icon at the top right corner):\r\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/zappysys.zendesk.com\/attachments\/token\/7D9Rx9qHJswkt28sC5vTggrNT\/?name=inline-1178316509.png\" alt=\"Accessing Salesforce Setup to create an OAuth App\" width=\"342\" height=\"233\" data-original-height=\"233\" data-original-width=\"342\" \/><\/li>\r\n \t<li>Then in the search bar input \"app\" and open <strong><em>App Manager<\/em><\/strong>:\r\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/zappysys.zendesk.com\/attachments\/token\/DTjFQpyDw4NViKdJyhyFkO1ng\/?name=inline1698967483.png\" alt=\"Searching Salesforce App Manager to create an OAuth App\" width=\"689\" height=\"364\" data-original-height=\"364\" data-original-width=\"689\" \/><\/li>\r\n \t<li>Then click <strong><em>New Connected App<\/em><\/strong> to create a new OAuth App:\r\n<strong>NOTE:<\/strong> In some version, it may say <strong><strong>New External Client App\r\n<\/strong><\/strong>\r\n<p data-start=\"1271\" data-end=\"1309\">Look for one of the following buttons:<\/p>\r\n\r\n<ul data-start=\"1310\" data-end=\"1395\">\r\n \t<li data-start=\"1310\" data-end=\"1348\">\r\n<p data-start=\"1312\" data-end=\"1348\"><strong data-start=\"1312\" data-end=\"1333\">New Connected App<\/strong> (Classic name)<\/p>\r\n<\/li>\r\n \t<li data-start=\"1349\" data-end=\"1395\">\r\n<p data-start=\"1351\" data-end=\"1395\"><strong data-start=\"1351\" data-end=\"1378\">New External Client App<\/strong> (Lightning name)<\/p>\r\n<\/li>\r\n<\/ul>\r\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/zappysys.zendesk.com\/attachments\/token\/eD6OrA9TqfRuM5N41Vqd7nrvb\/?name=inline684283902.png\" alt=\"Creating a Salesforce App to get data via ODBC driver\" width=\"867\" height=\"327\" data-original-height=\"327\" data-original-width=\"867\" \/><\/li>\r\n \t<li>Give your\u00a0App a name and:\r\n- Enable OAuth Settings\r\n- Set callback URL to following two URLs (one in each line)\r\n<strong><em>https:\/\/login.salesforce.com\/services\/oauth2\/success\r\n<\/em><\/strong><em><strong>https:\/\/zappysys.com\/oauth<\/strong><\/em>\r\n- Add an OAuth scope you want or simply add \"<strong><em>Full access<\/em><\/strong>\".\r\n- Add \"<strong><em>Perform requests on your behalf at any time (offline_token)<\/em><\/strong>\" scope to get a refresh\u00a0token so that you don't have to re-authenticate each time requesting an access token:<a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/create-salesforce-connected-oauth-app-for-odbc-datasource.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-4267 size-full\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/create-salesforce-connected-oauth-app-for-odbc-datasource.png\" alt=\"Configuring Salesforce App OAuth settings to get data via ODBC driver\" width=\"1041\" height=\"700\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/create-salesforce-connected-oauth-app-for-odbc-datasource.png 1041w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/create-salesforce-connected-oauth-app-for-odbc-datasource-300x202.png 300w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/create-salesforce-connected-oauth-app-for-odbc-datasource-768x516.png 768w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/create-salesforce-connected-oauth-app-for-odbc-datasource-1024x689.png 1024w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/create-salesforce-connected-oauth-app-for-odbc-datasource-272x182.png 272w\" sizes=\"(max-width: 1041px) 100vw, 1041px\" \/><\/a>\r\n\r\n<span style=\"text-decoration: underline; color: #800000;\"><strong>IMPORTANT:<\/strong><\/span> You can use \"<strong>Access and manage your data (api)<\/strong>\" if you do not like to grant full permission to this app but make sure you request same permission from the caller app too\u00a0 (Example on ZappySys Salesforce Connection UI -&gt; Advanced Tab -&gt; Set scope as \"<strong>api offline_access<\/strong>\" rather than \"<strong>full offline_access<\/strong>\"<\/li>\r\n \t<li>Click \"Save\".<\/li>\r\n<\/ol>\r\n<h3>Get Client Id and Client Secret for Salesforce Connected App<\/h3>\r\nOnce the App is created, we need to find out the App Id \/ Secret so we can use it for API calls.\r\n<ol>\r\n \t<li>Go to App Manager<\/li>\r\n \t<li>Find out the recently created App and click View (click on the small arrow to the right)\r\n<a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2021\/12\/salesforce-view-edit-oauth-app-settings.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9477\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2021\/12\/salesforce-view-edit-oauth-app-settings.png\" alt=\"\" width=\"1029\" height=\"413\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2021\/12\/salesforce-view-edit-oauth-app-settings.png 1029w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2021\/12\/salesforce-view-edit-oauth-app-settings-300x120.png 300w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2021\/12\/salesforce-view-edit-oauth-app-settings-768x308.png 768w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2021\/12\/salesforce-view-edit-oauth-app-settings-1024x411.png 1024w\" sizes=\"(max-width: 1029px) 100vw, 1029px\" \/><\/a><\/li>\r\n \t<li>Once App page is loaded you can Copy <strong>Consumer Key<\/strong> and <strong>Consumer Secret<\/strong> (click on reveal to see). Also copy anyone Call back URL (We will need this for OAuth Connection &gt; Advanced Tab &gt; Call Back URL or Redirect URL property depending on which ZappySys Product \/ Driver you are using)\r\n<a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2021\/12\/salesforce-oauth-app-clientid-secret-callbackurl.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9478\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2021\/12\/salesforce-oauth-app-clientid-secret-callbackurl.png\" alt=\"\" width=\"974\" height=\"554\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2021\/12\/salesforce-oauth-app-clientid-secret-callbackurl.png 974w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2021\/12\/salesforce-oauth-app-clientid-secret-callbackurl-300x171.png 300w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2021\/12\/salesforce-oauth-app-clientid-secret-callbackurl-768x437.png 768w\" sizes=\"(max-width: 974px) 100vw, 974px\" \/><\/a><\/li>\r\n \t<li>That's it, you can now use these 3 pieces to ZappySys <strong>OAuth connection UI<\/strong> or on <strong>Salesforce Connection UI<\/strong> (new version with OAuth support). The above screenshot shows where to enter these 3 pieces in the New Salesforce Connection. For the OAuth Connection, the redirect URL goes to the Advanced Tab &gt; Callback URL textbox.<\/li>\r\n<\/ol>\r\n<h3>Get Client Id and Secret for Salesforce External Client App<\/h3>\r\nIf you created a new App by clicking on the <strong>New External Client App<\/strong> button, then your App may not be visible in the App Manager Screen. In that case, find it below way.\r\n\r\n[caption id=\"attachment_11637\" align=\"alignnone\" width=\"1222\"]<a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2021\/12\/obtain-salesforce-oauth-clientid-secret.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-11637\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2021\/12\/obtain-salesforce-oauth-clientid-secret.jpg\" alt=\"\" width=\"1222\" height=\"733\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2021\/12\/obtain-salesforce-oauth-clientid-secret.jpg 1222w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2021\/12\/obtain-salesforce-oauth-clientid-secret-300x180.jpg 300w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2021\/12\/obtain-salesforce-oauth-clientid-secret-1024x614.jpg 1024w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2021\/12\/obtain-salesforce-oauth-clientid-secret-768x461.jpg 768w\" sizes=\"(max-width: 1222px) 100vw, 1222px\" \/><\/a> Get Client Id, Client Secret - For New External Client App[\/caption]\r\n<h3>Enable Client Credentials Grant (Non-Interactive Run-As)<\/h3>\r\nIf you like to enable Non-Interactive mode, just like UserId \/ Password Authentication, but without actually passing a real UserId or Password on the Connection UI, then you can enable Client Credentials Flow as below.\r\n\r\n<strong>NOTE:<\/strong> Only the New version of ZappySys Salesforce Connection supports Client Credentials Grant. <span style=\"text-decoration: underline;\"><strong>Version released after Nov 1, 2025 supports this grant type<\/strong><\/span>.\r\n\r\n[caption id=\"attachment_11639\" align=\"alignnone\" width=\"419\"]<a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2021\/12\/salesforce-client-credentials-grant-runas.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-11639\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2021\/12\/salesforce-client-credentials-grant-runas.jpg\" alt=\"\" width=\"419\" height=\"480\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2021\/12\/salesforce-client-credentials-grant-runas.jpg 419w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2021\/12\/salesforce-client-credentials-grant-runas-262x300.jpg 262w\" sizes=\"(max-width: 419px) 100vw, 419px\" \/><\/a> Enable Salesforce Client Credentials Grant (Run As)[\/caption]\r\n<h3>(OPTIONAL) Configure Salesforce OAuth refresh token validity<\/h3>\r\nBy default, Salesforce Refresh Token doesn't expire once you generate. If you want to change the default behavior, follow these steps.\r\n<ol>\r\n \t<li>Go to \"<strong>Manage Connected Apps<\/strong>\" menu item and press on your App name:<img loading=\"lazy\" decoding=\"async\" class=\"wp-image-4298 size-full\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-oauth-app-policy-management-2.png\" alt=\"Finding Salesforce App to configure its policies\" width=\"660\" height=\"410\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-oauth-app-policy-management-2.png 660w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-oauth-app-policy-management-2-300x186.png 300w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-oauth-app-policy-management-2-436x272.png 436w\" sizes=\"(max-width: 660px) 100vw, 660px\" \/><\/li>\r\n \t<li>Click \"Edit Policies\" to configure refresh token validity:\r\n<img loading=\"lazy\" decoding=\"async\" class=\"wp-image-4271 size-full\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/edit-salesforce-connected-app-policies.png\" alt=\"Editing Salesforce App OAuth refresh token issuing policy\" width=\"680\" height=\"391\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/edit-salesforce-connected-app-policies.png 680w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/edit-salesforce-connected-app-policies-300x173.png 300w\" sizes=\"(max-width: 680px) 100vw, 680px\" \/><\/li>\r\n \t<li>Set \"<strong>All users may self-authorize<\/strong>\" and \"<strong>Refresh token is valid until revoked<\/strong>\" options:<a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-rest-api-app-odbc-oauth-refresh-token-validity-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-4273 size-full\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-rest-api-app-odbc-oauth-refresh-token-validity-1.png\" alt=\"Making Salesforce App OAuth refresh token to never expire\" width=\"870\" height=\"498\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-rest-api-app-odbc-oauth-refresh-token-validity-1.png 870w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-rest-api-app-odbc-oauth-refresh-token-validity-1-300x172.png 300w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-rest-api-app-odbc-oauth-refresh-token-validity-1-768x440.png 768w\" sizes=\"(max-width: 870px) 100vw, 870px\" \/><\/a><\/li>\r\n \t<li>Click \"Save\".<\/li>\r\n<\/ol>\r\n<h3><\/h3><\/div>\n<h2><span id=\"Step-by-Step_Get_data_from_HubSpot_API_into_SQL_Server_database\"><span id=\"Step-By-StepGet_data_from_HubSpot_REST_API\"><span id=\"Step-By-Step_8211_Call_Amazon_MWS_API_using_SSIS\">Calling Salesforce REST API with ODBC driver<\/span><\/span><\/span><\/h2>\n<p>To call Salesforce API, you need to have a Salesforce Connected App with enabled OAuth authentication. It will be used by ODBC Data Source, which we will create in the subsequent step. Then we will configure ODBC Data Source with Salesforce REST API URL and other parameters to access the leads.<\/p>\n<h3>How to Find Your Salesforce Instance ID<\/h3>\n<p>To call Salesforce API you have to supply Salesforce InstanceID in API Url. If you are not sure what is your Salesforce Instance ID then its very simple. Just look at your Salesforce URL after you login in Browser. First part in Domain would be your InstanceID (e.g. <strong>na34<\/strong>\u00a0if your URL looks like <strong>https:\/\/<span style=\"color: #3366ff;\">na34<\/span>.salesforce.com\/xxxxxxxxx<\/strong> ). You can also click <strong>Setup<\/strong> &gt; Under <strong>Administrator<\/strong> &gt; Click <strong>Company Profile<\/strong> &gt; <strong>Company Information<\/strong>\u00a0&gt; Look for\u00a0<strong>Instance<\/strong><\/p>\n<div id=\"attachment_5237\" style=\"width: 1006px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/how-to-find-salesforce-instance-id.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-5237\" class=\"size-full wp-image-5237\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/how-to-find-salesforce-instance-id.png\" alt=\"How to find your Salesforce Instance ID\" width=\"996\" height=\"364\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/how-to-find-salesforce-instance-id.png 996w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/how-to-find-salesforce-instance-id-300x110.png 300w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/how-to-find-salesforce-instance-id-768x281.png 768w\" sizes=\"(max-width: 996px) 100vw, 996px\" \/><\/a><p id=\"caption-attachment-5237\" class=\"wp-caption-text\">How to find your Salesforce Instance ID<\/p><\/div>\n<p>&nbsp;<\/p>\n<h3>Create an ODBC Data Source using ZappySys JSON Driver<\/h3>\n<ol>\n<li>Open ODBC Data Source Administrator\n<div id=\"attachment_4232\" style=\"width: 403px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4232\" class=\"wp-image-4232 size-full\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/open-ODBC-Data-souce-administrator.png\" alt=\"Finding Windows ODBC Data Source Manager\" width=\"393\" height=\"531\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/open-ODBC-Data-souce-administrator.png 393w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/open-ODBC-Data-souce-administrator-222x300.png 222w\" sizes=\"(max-width: 393px) 100vw, 393px\" \/><p id=\"caption-attachment-4232\" class=\"wp-caption-text\">Finding Windows ODBC Data Source Manager<\/p><\/div><\/li>\n<li>Add a new ODBC Data Source based on <em>ZappySys JSON Driver<\/em>:\n<div id=\"attachment_4268\" style=\"width: 604px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/create-odbc-datasource-using-zappysys-json-driver.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4268\" class=\"wp-image-4268 size-full\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/create-odbc-datasource-using-zappysys-json-driver.png\" alt=\"Adding a new ODBC Data Source based on ZappySys JSON Driver\" width=\"594\" height=\"550\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/create-odbc-datasource-using-zappysys-json-driver.png 594w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/create-odbc-datasource-using-zappysys-json-driver-300x278.png 300w\" sizes=\"(max-width: 594px) 100vw, 594px\" \/><\/a><p id=\"caption-attachment-4268\" class=\"wp-caption-text\">Adding a new ODBC Data Source based on ZappySys JSON Driver<\/p><\/div><\/li>\n<\/ol>\n<h3>Configure the Data Source<\/h3>\n<ol>\n<li>Start configuring Data Source:<br \/>\n&#8211; Enter URL:<br \/>\n<em>https:\/\/<strong>&lt;your_instance&gt;<\/strong>.salesforce.com\/services\/data\/v20.0\/query\/?q=SELECT+id,name,email+FROM+Lead<br \/>\n<\/em>&#8211; Select &#8220;<em>OAuth<\/em>&#8221; for Connection Type.<br \/>\n&#8211; You can set <em>HTTP Request Method<\/em> to &#8220;GET&#8221;.<br \/>\n&#8211; Continue by clicking &#8220;Click to Configure&#8221;:<\/p>\n<div id=\"attachment_4274\" style=\"width: 670px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-rest-api-odbc-zappysys-json-driver-configuration.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4274\" class=\"wp-image-4274 size-full\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-rest-api-odbc-zappysys-json-driver-configuration-e1530705704131.png\" alt=\"Configuring ODBC Data Source to get leads from Salesforce\" width=\"660\" height=\"702\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-rest-api-odbc-zappysys-json-driver-configuration-e1530705704131.png 660w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-rest-api-odbc-zappysys-json-driver-configuration-e1530705704131-282x300.png 282w\" sizes=\"(max-width: 660px) 100vw, 660px\" \/><\/a><p id=\"caption-attachment-4274\" class=\"wp-caption-text\">Configuring ODBC Data Source to get leads from Salesforce<\/p><\/div><\/li>\n<li>Once a window appears, go to <em>Salesforce App Manager<\/em> and view your App settings, so that you can use them for Data Source configuration:\n<div id=\"attachment_4275\" style=\"width: 868px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-oauth-app-view-settings-for-odbc-configuration.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4275\" class=\"wp-image-4275 size-full\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-oauth-app-view-settings-for-odbc-configuration.png\" alt=\"Opening Salesforce App OAuth settings to be used in ODBC Data Source\" width=\"858\" height=\"289\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-oauth-app-view-settings-for-odbc-configuration.png 858w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-oauth-app-view-settings-for-odbc-configuration-300x101.png 300w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-oauth-app-view-settings-for-odbc-configuration-768x259.png 768w\" sizes=\"(max-width: 858px) 100vw, 858px\" \/><\/a><p id=\"caption-attachment-4275\" class=\"wp-caption-text\">Opening Salesforce App OAuth settings to be used in ODBC Data Source<\/p><\/div><\/li>\n<li>Then go back to ODBC configuration, select tab <em>Advanced<\/em> and set <em>Callback\/Return Url<\/em> to &#8220;<em>https:\/\/login.salesforce.com\/services\/oauth2\/success<\/em>&#8220;:\n<div id=\"attachment_4278\" style=\"width: 596px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-rest-api-odbc-data-source-oauth-callback-configuration.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4278\" class=\"wp-image-4278 size-full\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-rest-api-odbc-data-source-oauth-callback-configuration.png\" alt=\"Configuring Callback Url in ODBC Data Source OAuth options\" width=\"586\" height=\"493\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-rest-api-odbc-data-source-oauth-callback-configuration.png 586w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-rest-api-odbc-data-source-oauth-callback-configuration-300x252.png 300w\" sizes=\"(max-width: 586px) 100vw, 586px\" \/><\/a><p id=\"caption-attachment-4278\" class=\"wp-caption-text\">Configuring Callback Url in ODBC Data Source OAuth options<\/p><\/div><\/li>\n<li>Then go back to tab <em>General<\/em>\u00a0and configure rest options using Salesforce App settings:<br \/>\n&#8211; From Salesforce App settings copy <strong><em>Consumer Key<\/em><\/strong> to <strong><em>Client Id<\/em><\/strong><br \/>\n&#8211; Then copy <em>Consumer Secret<\/em> to <em>Client Secret<br \/>\n&#8211;\u00a0<\/em>Set <strong>Authorization Url<\/strong> to &#8220;<em>https:\/\/login.salesforce.com\/services\/oauth2\/authorize&#8221;<\/em><br \/>\n&#8211; Set <strong>Access Token Url<\/strong> to &#8220;<em>https:\/\/login.salesforce.com\/services\/oauth2\/token&#8221;<br \/>\n<\/em>&#8211; Set <strong>Scopes<\/strong> to below (For complete list of possible scopes <a href=\"https:\/\/help.salesforce.com\/s\/articleView?id=sf.remoteaccess_oauth_tokens_scopes.htm&amp;type=5\" target=\"_blank\" rel=\"noopener\">refer this link<\/a>\u00a0&#8211; scroll to OAuth Scopes section)<\/p>\n<pre class=\"lang:default highlight:0 decode:true \">full\r\noffline_access<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<div id=\"attachment_4276\" style=\"width: 887px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-oauth-app-configuration-for-odbc.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4276\" class=\"wp-image-4276 size-full\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-oauth-app-configuration-for-odbc.png\" alt=\"Configuring ODBC Data Source with Salesforce App OAuth settings\" width=\"877\" height=\"591\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-oauth-app-configuration-for-odbc.png 877w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-oauth-app-configuration-for-odbc-300x202.png 300w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-oauth-app-configuration-for-odbc-768x518.png 768w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-oauth-app-configuration-for-odbc-272x182.png 272w\" sizes=\"(max-width: 877px) 100vw, 877px\" \/><\/a><p id=\"caption-attachment-4276\" class=\"wp-caption-text\">Configuring ODBC Data Source with Salesforce App OAuth settings<\/p><\/div>\n<div class=\"su-note\"  style=\"border-color:#e5dd9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#FFF7B7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><a href=\"https:\/\/developer.salesforce.com\/docs\/atlas.en-us.api_rest.meta\/api_rest\/intro_understanding_oauth_endpoints.htm\" target=\"_blank\" rel=\"noopener\">On a sandbox organization you need to use &#8220;test.salesforce.com&#8221; domain<\/a><\/div><\/div><\/li>\n<li>Click &#8220;Generate Token&#8221; button to generate the tokens. Once Salesforce login window appears, enter your Salesforce credentials and log in.<\/li>\n<li>Click &#8220;OK&#8221; to close the window.<\/li>\n<\/ol>\n<h3>Load\u00a0data from Salesforce using ODBC Data Source<\/h3>\n<p>We are ready to retrieve the data. So just open &#8220;Preview&#8221; tab in Data Source configuration window and hit &#8220;Preview Data&#8221; button:<\/p>\n<div id=\"attachment_4282\" style=\"width: 780px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-rest-api-data-retrieval-preview-using-odbc-powerpack-1.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4282\" class=\"wp-image-4282 size-full\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-rest-api-data-retrieval-preview-using-odbc-powerpack-1.png\" alt=\"Previewing Salesforce data in ODBC Data Source\" width=\"770\" height=\"645\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-rest-api-data-retrieval-preview-using-odbc-powerpack-1.png 770w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-rest-api-data-retrieval-preview-using-odbc-powerpack-1-300x251.png 300w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-rest-api-data-retrieval-preview-using-odbc-powerpack-1-768x643.png 768w\" sizes=\"(max-width: 770px) 100vw, 770px\" \/><\/a><p id=\"caption-attachment-4282\" class=\"wp-caption-text\">Previewing Salesforce data in ODBC Data Source<\/p><\/div>\n<p>As you see we have no actual lead names because they are present in column &#8220;records&#8221;. So replace &#8220;$&#8221; with column name &#8220;records&#8221; in &#8220;SELECT * FROM $&#8221; query to select actual lead records from JSON property &#8220;records&#8221; (which denotes a table in ODBC):<\/p>\n<div id=\"attachment_4283\" style=\"width: 780px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-rest-api-data-retrieval-preview-2-using-odbc-powerpack-1.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4283\" class=\"wp-image-4283 size-full\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-rest-api-data-retrieval-preview-2-using-odbc-powerpack-1.png\" alt=\"Changing table name in ODBC query to get the actual leads\" width=\"770\" height=\"645\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-rest-api-data-retrieval-preview-2-using-odbc-powerpack-1.png 770w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-rest-api-data-retrieval-preview-2-using-odbc-powerpack-1-300x251.png 300w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-rest-api-data-retrieval-preview-2-using-odbc-powerpack-1-768x643.png 768w\" sizes=\"(max-width: 770px) 100vw, 770px\" \/><\/a><p id=\"caption-attachment-4283\" class=\"wp-caption-text\">Changing table name in ODBC query to get the actual leads<\/p><\/div>\n<p>Then click &#8220;Preview Data&#8221; again to get the leads:<\/p>\n<div id=\"attachment_4284\" style=\"width: 697px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-rest-api-data-retrieval-preview-final-using-odbc-powerpack.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4284\" class=\"wp-image-4284 size-full\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-rest-api-data-retrieval-preview-final-using-odbc-powerpack.png\" alt=\"Successfully retrieved Salesforce leads using Salesforce REST API and ODBC Driver\" width=\"687\" height=\"645\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-rest-api-data-retrieval-preview-final-using-odbc-powerpack.png 687w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-rest-api-data-retrieval-preview-final-using-odbc-powerpack-300x282.png 300w\" sizes=\"(max-width: 687px) 100vw, 687px\" \/><\/a><p id=\"caption-attachment-4284\" class=\"wp-caption-text\">Successfully retrieved Salesforce leads using Salesforce REST API and ODBC Driver<\/p><\/div>\n<p>You are ready to use ODBC Data Source in an application!<\/p>\n<h2>Pagination in Salesforce REST API<\/h2>\n<p>Even you are ready to use the configured ODBC Data Source in an external application, the solution is not yet fully implemented. If you have too\u00a0many leads or records than Salesforce can give you in one HTTP response you won&#8217;t get all the records. Thus you will need to use pagination. For that, go to &#8220;Pagination&#8221; tab and configure it like this:<\/p>\n<div id=\"attachment_4286\" style=\"width: 802px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-rest-api-get-data-pagination-configuration-1.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4286\" class=\"wp-image-4286 size-full\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-rest-api-get-data-pagination-configuration-1.png\" alt=\"Configuring ODBC Data Source to paginate through Salesforce results\" width=\"792\" height=\"789\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-rest-api-get-data-pagination-configuration-1.png 792w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-rest-api-get-data-pagination-configuration-1-150x150.png 150w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-rest-api-get-data-pagination-configuration-1-300x300.png 300w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/salesforce-rest-api-get-data-pagination-configuration-1-768x765.png 768w\" sizes=\"(max-width: 792px) 100vw, 792px\" \/><\/a><p id=\"caption-attachment-4286\" class=\"wp-caption-text\">Configuring ODBC Data Source to paginate through Salesforce results<\/p><\/div>\n<p>If you need something more sophisticated then check <a href=\"https:\/\/zappysys.com\/blog\/ssis-rest-api-looping-until-no-more-pages-found\/\" target=\"_blank\" rel=\"noopener\">the article<\/a>\u00a0about pagination (initially it was written for SSIS PowerPack but UI options and concepts apply to ODBC Driver too).<\/p>\n<h2>Using ODBC query in an application<\/h2>\n<p>Let&#8217;s say you want to access Salesforce Accounts instead of Leads. It seems the most logical thing to do is create another ODBC Data Source and change the URL. However, you can use the same ODBC Data Source and override its properties with ODBC query.\u00a0Just copy the generated ODBC query, leave the things you want to override and use it in your application:<\/p>\n<pre class=\"lang:tsql decode:true\">SELECT * FROM records\r\nWITH(\r\nSrc='https:\/\/***yourinstance****.salesforce.com\/services\/data\/v44.0\/query\/?q=SELECT+Id,name,Email+FROM+Lead'\r\n)<\/pre>\n<p>In the example above, we are overriding &#8220;Url&#8221; property and accessing Accounts.<\/p>\n<p>Check an article <a href=\"https:\/\/zappysys.com\/blog\/import-json-excel-load-file-rest-api\/\" target=\"_blank\" rel=\"noopener\">how to import data into Excel using ODBC Data Source with ZappySys<\/a>\u00a0to see how to use ODBC Data Source in your application. For more examples, check <a href=\"https:\/\/zappysys.com\/blog\/category\/odbc-powerpack\/\" target=\"_blank\" rel=\"noopener\">ODBC PowerPack blog category<\/a>.<\/p>\n<h2>Field names for SELECT Query<\/h2>\n<p>One known issue in Salesforce REST API is you cannot use * to fetch all columns in SOQL. So you must specify column names manually. If you like to know all possible column names for given Table name then use below query.<\/p>\n<p>https:\/\/na34.salesforce.com\/services\/data\/v20.0\/sobjects\/Account\/describe\/<\/p>\n<pre class=\"lang:tsql decode:true\">SELECT label,name,length,type,nillable,unique FROM $\r\nWITH(\r\n\t Src='https:\/\/**YOUR-INSTANCE**.salesforce.com\/services\/data\/v44.0\/sobjects\/**YOUR-TABLE**\/describe\/'\r\n\t,Filter='$.fields[*]'\r\n)<\/pre>\n<p>For example to get fields for Account table in ns34 instance you can use below URL<\/p>\n<p><strong>https:\/\/<span style=\"color: #3366ff;\">na34<\/span>.salesforce.com\/services\/data\/v44.0\/sobjects\/<span style=\"color: #3366ff;\">Account<\/span>\/describe\/<\/strong><\/p>\n<p>&nbsp;<\/p>\n<h2>Error Handling in Salesforce REST API<\/h2>\n<div class=\"content_block\" id=\"custom_post_widget-3894\">Sometimes errors occur... they just do and there is nothing you can do! Or can you? Actually, in ODBC PowerPack you can handle them in two ways.\r\n<h3>METHOD 1 - Using Error Handling Options<\/h3>\r\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3949\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/odbc-api-error-handling-1.png\" alt=\"\" width=\"668\" height=\"702\" \/>\r\n<h4>When to use?<\/h4>\r\nYou may want to use them when your source is a resource located\u00a0on\u00a0the Internet; e.g. a file on a website, a file on an FTP server or just a plain API HTTP response. By default, when a remote server returns an error, data retrieval is stopped, an error is raised and no data is given back to you. This might not be always desirable.\r\n<h4>Scenario 1<\/h4>\r\nImagine a scenario, that there is a\u00a0web server which\u00a0each day at 12 AM releases a new JSON file with\u00a0that day's date as filename, e.g. <span style=\"text-decoration: underline;\"><em>http:\/\/www.some-server.com\/data\/2018-06-20.json<\/em><\/span>. And, of course, you want to download it and use it daily in your Power BI report. But you have a problem: Power BI report data sources are\u00a0refreshed each\u00a0hour and you may get\u00a0<a href=\"https:\/\/en.wikipedia.org\/wiki\/HTTP_404\" target=\"_blank\" rel=\"noopener\">HTTP 404 status code<\/a>\u00a0(no file was found) when a\u00a0file is not released yet. Which consequentially means other data sources won't be updated as well and you will see old and cached data on the report. That's where\u00a0you could use\u00a0<strong><span class=\"lang:default highlight:0 decode:true crayon-inline\">Continue on any error<\/span><\/strong>\u00a0or <strong><span class=\"lang:default highlight:0 decode:true crayon-inline\">Continue when Url is invalid or missing (404 Errors)<\/span><\/strong>\u00a0to avoid an error being raised and let other data sources to be updated.\r\n<h4>Scenario 2<\/h4>\r\nAnother scenario is when you expect a web server to raise some kind of HTTP error when accessing a URL. You don't want ODBC Data Source to raise an error but instead, you want to get response data. That's where you can use\u00a0<strong><span class=\"lang:default highlight:0 decode:true crayon-inline\">Continue on any error<\/span><\/strong>\u00a0or alike together with\u00a0\u00a0<strong><span class=\"lang:default highlight:0 decode:true crayon-inline\">Get response data on error<\/span><\/strong>\u00a0to continue on an error and get the data:\r\n\r\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-3961 size-full\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/odbc-powerpack-get-response-data-on-error.png\" alt=\"\" width=\"547\" height=\"235\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/odbc-powerpack-get-response-data-on-error.png 547w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/odbc-powerpack-get-response-data-on-error-300x129.png 300w\" sizes=\"(max-width: 547px) 100vw, 547px\" \/>\r\n<h3>METHOD 2 - Using Connection [Retry Settings]<\/h3>\r\nAnother scenario you may run into is a buggy web server. You ask it to give you some file or data and it, like a snotty kid, just doesn't give it to you! You have to ask twice or thrice before it does its job. If that's the case, you have to retry HTTP requests using <em>Connection<\/em>:\r\n\r\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-3963 size-full\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2018\/06\/odbc-api-error-handling-3.png\" alt=\"\" width=\"671\" height=\"572\" \/><\/div>\n<h2>Using various Salesforce APIs<\/h2>\n<p>We used <a href=\"https:\/\/developer.salesforce.com\/docs\/atlas.en-us.api_rest.meta\/api_rest\/resources_search.htm\" target=\"_blank\" rel=\"noopener\">Salesforce REST API Search method<\/a> to access the leads. The <a href=\"https:\/\/developer.salesforce.com\/docs\/atlas.en-us.soql_sosl.meta\/soql_sosl\/sforce_api_calls_soql.htm\" target=\"_blank\" rel=\"noopener\">SOQL query<\/a> we used looks identical to SQL in our case, so you can use other <a href=\"https:\/\/developer.salesforce.com\/docs\/atlas.en-us.sfFieldRef.meta\/sfFieldRef\/salesforce_field_reference.htm\" target=\"_blank\" rel=\"noopener\">table names<\/a> to access their data too. Or you can even use <a href=\"https:\/\/developer.salesforce.com\/docs\/atlas.en-us.soql_sosl.meta\/soql_sosl\/sforce_api_calls_soql.htm\" target=\"_blank\" rel=\"noopener\">a more complex SOQL query<\/a> in the same <em>Search<\/em> method. The <em>Search<\/em>\u00a0method is not the only one that is available in Salesforce REST API, <a href=\"https:\/\/developer.salesforce.com\/docs\/atlas.en-us.api_rest.meta\/api_rest\/resources_list.htm\" target=\"_blank\" rel=\"noopener\">check other REST API methods<\/a>\u00a0too (you can even use the ones that insert\/update the data).<\/p>\n<p>In addition to <em>Salesforce REST API,<\/em> Salesforce has many more APIs, such as <em>Salesforce Marketing Cloud API<\/em>,<em> Salesforce CPQ API<\/em>,<em> Salesforce IoT REST API,<\/em> <a href=\"https:\/\/developer.salesforce.com\/docs\/api-explorer\" target=\"_blank\" rel=\"noopener\">and others<\/a>. You can use virtually any of them with <em>ZappySys JSON Driver<\/em> or <em>ZappySys XML Driver<\/em> since the\u00a0drivers are highly configurable (you can call any API method with any HTTP method &#8211; be it POST, PUT or any other).<\/p>\n<h2>Reading data from Salesforce Custom Reports<\/h2>\n<p>So far we talked basic query to read data using SOQL \/ Standard Tables. But what if you have cuCheck <a href=\"https:\/\/zappysys.com\/blog\/read-salesforce-custom-reports-ssis-odbc\/\" target=\"_blank\" rel=\"noopener\">this article<\/a> to findout some techniques to read data from salesforce Custom Reports.<\/p>\n<h2>Resources<\/h2>\n<ul>\n<li><a href=\"https:\/\/developer.salesforce.com\/docs\/atlas.en-us.api_rest.meta\/api_rest\/resources_search.htm\" target=\"_blank\" rel=\"noopener\">Salesforce REST API Search method documentation<\/a><\/li>\n<li><a href=\"https:\/\/developer.salesforce.com\/docs\/atlas.en-us.api_rest.meta\/api_rest\/resources_list.htm\" target=\"_blank\" rel=\"noopener\">Salesforce REST API methods<\/a><\/li>\n<li><a href=\"https:\/\/developer.salesforce.com\/docs\/atlas.en-us.sfFieldRef.meta\/sfFieldRef\/salesforce_field_reference.htm\" target=\"_blank\" rel=\"noopener\">Salesforce Table list<\/a><\/li>\n<li><a href=\"https:\/\/developer.salesforce.com\/docs\/atlas.en-us.soql_sosl.meta\/soql_sosl\/sforce_api_calls_soql.htm\" target=\"_blank\" rel=\"noopener\">Salesforce SOQL Documentation<\/a><\/li>\n<li><a href=\"https:\/\/developer.salesforce.com\/docs\/api-explorer\" target=\"_blank\" rel=\"noopener\">Salesforce API Explorer<\/a><\/li>\n<\/ul>\n<h2>Conclusion<\/h2>\n<p>We covered a whole process of how to access Salesforce data: starting from creating a Salesforce application, continuing by authenticating using OAuth and finishing by using an ODBC query in a target application. You learned how to retrieve the fields of Salesforce leads and paginate through the results. Now you are on a good path of using other API methods and even other Salesforce APIs \ud83d\ude09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Salesforce\u00a0is a popular CRM tool that lets you manage your sales, contacts, products, and other useful things. In this tutorial, you will learn how to call Salesforce REST API via ODBC driver using\u00a0ZappySys JSON Driver. You can also use \u00a0ZappySys Salesforce Driver for salesforce data read \/ write but this article covers more more [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":1764,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[277,276],"tags":[6,60,279,3,210],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\r\n<title>How to call Salesforce REST API via ODBC driver | ZappySys Blog<\/title>\r\n<meta name=\"description\" content=\"How to call Salesforce REST API via ODBC driver - ZappySys Blog\" \/>\r\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\r\n<link rel=\"canonical\" href=\"https:\/\/zappysys.com\/blog\/how-to-call-salesforce-rest-api-via-odbc-driver\/\" \/>\r\n<meta property=\"og:locale\" content=\"en_US\" \/>\r\n<meta property=\"og:type\" content=\"article\" \/>\r\n<meta property=\"og:title\" content=\"How to call Salesforce REST API via ODBC driver | ZappySys Blog\" \/>\r\n<meta property=\"og:description\" content=\"How to call Salesforce REST API via ODBC driver - ZappySys Blog\" \/>\r\n<meta property=\"og:url\" content=\"https:\/\/zappysys.com\/blog\/how-to-call-salesforce-rest-api-via-odbc-driver\/\" \/>\r\n<meta property=\"og:site_name\" content=\"ZappySys Blog\" \/>\r\n<meta property=\"article:published_time\" content=\"2018-06-29T12:59:37+00:00\" \/>\r\n<meta property=\"article:modified_time\" content=\"2021-12-27T20:33:01+00:00\" \/>\r\n<meta property=\"og:image\" content=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/09\/salesforce-logo-180x180.png\" \/>\r\n\t<meta property=\"og:image:width\" content=\"180\" \/>\r\n\t<meta property=\"og:image:height\" content=\"180\" \/>\r\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\r\n<meta name=\"author\" content=\"ZappySys\" \/>\r\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\r\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"ZappySys\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\r\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/zappysys.com\/blog\/how-to-call-salesforce-rest-api-via-odbc-driver\/\",\"url\":\"https:\/\/zappysys.com\/blog\/how-to-call-salesforce-rest-api-via-odbc-driver\/\",\"name\":\"How to call Salesforce REST API via ODBC driver | ZappySys Blog\",\"isPartOf\":{\"@id\":\"https:\/\/zappysys.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/zappysys.com\/blog\/how-to-call-salesforce-rest-api-via-odbc-driver\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/zappysys.com\/blog\/how-to-call-salesforce-rest-api-via-odbc-driver\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/09\/salesforce-logo-180x180.png\",\"datePublished\":\"2018-06-29T12:59:37+00:00\",\"dateModified\":\"2021-12-27T20:33:01+00:00\",\"author\":{\"@id\":\"https:\/\/zappysys.com\/blog\/#\/schema\/person\/c146068d4cb053724ae5ce85759c3ada\"},\"description\":\"How to call Salesforce REST API via ODBC driver - ZappySys Blog\",\"breadcrumb\":{\"@id\":\"https:\/\/zappysys.com\/blog\/how-to-call-salesforce-rest-api-via-odbc-driver\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/zappysys.com\/blog\/how-to-call-salesforce-rest-api-via-odbc-driver\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/zappysys.com\/blog\/how-to-call-salesforce-rest-api-via-odbc-driver\/#primaryimage\",\"url\":\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/09\/salesforce-logo-180x180.png\",\"contentUrl\":\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/09\/salesforce-logo-180x180.png\",\"width\":180,\"height\":180},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/zappysys.com\/blog\/how-to-call-salesforce-rest-api-via-odbc-driver\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/zappysys.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to call Salesforce REST API via ODBC driver\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/zappysys.com\/blog\/#website\",\"url\":\"https:\/\/zappysys.com\/blog\/\",\"name\":\"ZappySys Blog\",\"description\":\"SSIS \/ ODBC Drivers \/ API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/zappysys.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/zappysys.com\/blog\/#\/schema\/person\/c146068d4cb053724ae5ce85759c3ada\",\"name\":\"ZappySys\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/zappysys.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/60165d46d0b33aefb91df61a22b0e1f4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/60165d46d0b33aefb91df61a22b0e1f4?s=96&d=mm&r=g\",\"caption\":\"ZappySys\"},\"url\":\"https:\/\/zappysys.com\/blog\/author\/gliaskus\/\"}]}<\/script>\r\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to call Salesforce REST API via ODBC driver | ZappySys Blog","description":"How to call Salesforce REST API via ODBC driver - ZappySys Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/zappysys.com\/blog\/how-to-call-salesforce-rest-api-via-odbc-driver\/","og_locale":"en_US","og_type":"article","og_title":"How to call Salesforce REST API via ODBC driver | ZappySys Blog","og_description":"How to call Salesforce REST API via ODBC driver - ZappySys Blog","og_url":"https:\/\/zappysys.com\/blog\/how-to-call-salesforce-rest-api-via-odbc-driver\/","og_site_name":"ZappySys Blog","article_published_time":"2018-06-29T12:59:37+00:00","article_modified_time":"2021-12-27T20:33:01+00:00","og_image":[{"width":180,"height":180,"url":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/09\/salesforce-logo-180x180.png","type":"image\/png"}],"author":"ZappySys","twitter_card":"summary_large_image","twitter_misc":{"Written by":"ZappySys","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/zappysys.com\/blog\/how-to-call-salesforce-rest-api-via-odbc-driver\/","url":"https:\/\/zappysys.com\/blog\/how-to-call-salesforce-rest-api-via-odbc-driver\/","name":"How to call Salesforce REST API via ODBC driver | ZappySys Blog","isPartOf":{"@id":"https:\/\/zappysys.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/zappysys.com\/blog\/how-to-call-salesforce-rest-api-via-odbc-driver\/#primaryimage"},"image":{"@id":"https:\/\/zappysys.com\/blog\/how-to-call-salesforce-rest-api-via-odbc-driver\/#primaryimage"},"thumbnailUrl":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/09\/salesforce-logo-180x180.png","datePublished":"2018-06-29T12:59:37+00:00","dateModified":"2021-12-27T20:33:01+00:00","author":{"@id":"https:\/\/zappysys.com\/blog\/#\/schema\/person\/c146068d4cb053724ae5ce85759c3ada"},"description":"How to call Salesforce REST API via ODBC driver - ZappySys Blog","breadcrumb":{"@id":"https:\/\/zappysys.com\/blog\/how-to-call-salesforce-rest-api-via-odbc-driver\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/zappysys.com\/blog\/how-to-call-salesforce-rest-api-via-odbc-driver\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/zappysys.com\/blog\/how-to-call-salesforce-rest-api-via-odbc-driver\/#primaryimage","url":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/09\/salesforce-logo-180x180.png","contentUrl":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/09\/salesforce-logo-180x180.png","width":180,"height":180},{"@type":"BreadcrumbList","@id":"https:\/\/zappysys.com\/blog\/how-to-call-salesforce-rest-api-via-odbc-driver\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/zappysys.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to call Salesforce REST API via ODBC driver"}]},{"@type":"WebSite","@id":"https:\/\/zappysys.com\/blog\/#website","url":"https:\/\/zappysys.com\/blog\/","name":"ZappySys Blog","description":"SSIS \/ ODBC Drivers \/ API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/zappysys.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/zappysys.com\/blog\/#\/schema\/person\/c146068d4cb053724ae5ce85759c3ada","name":"ZappySys","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/zappysys.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/60165d46d0b33aefb91df61a22b0e1f4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/60165d46d0b33aefb91df61a22b0e1f4?s=96&d=mm&r=g","caption":"ZappySys"},"url":"https:\/\/zappysys.com\/blog\/author\/gliaskus\/"}]}},"_links":{"self":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts\/4241"}],"collection":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/comments?post=4241"}],"version-history":[{"count":30,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts\/4241\/revisions"}],"predecessor-version":[{"id":9481,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts\/4241\/revisions\/9481"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/media\/1764"}],"wp:attachment":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/media?parent=4241"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/categories?post=4241"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/tags?post=4241"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}