<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>OAuthApp Archives | ZappySys Blog</title>
	<atom:link href="https://zappysys.com/blog/tag/oauthapp/feed/" rel="self" type="application/rss+xml" />
	<link>https://zappysys.com/blog/tag/oauthapp/</link>
	<description>SSIS / ODBC Drivers / API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more</description>
	<lastBuildDate>Wed, 05 Jun 2024 21:35:54 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.4.4</generator>

<image>
	<url>https://zappysys.com/blog/wp-content/uploads/2023/01/cropped-zappysys-symbol-large-32x32.png</url>
	<title>OAuthApp Archives | ZappySys Blog</title>
	<link>https://zappysys.com/blog/tag/oauthapp/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to register Facebook OAuth App for Graph API Access</title>
		<link>https://zappysys.com/blog/register-facebook-oauth-app-graph-api/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Thu, 16 Jun 2016 18:27:52 +0000</pubDate>
				<category><![CDATA[REST API]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[facebook graph api]]></category>
		<category><![CDATA[json source]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[oauth2]]></category>
		<category><![CDATA[OAuthApp]]></category>
		<category><![CDATA[ssis]]></category>
		<guid isPermaLink="false">http://zappysys.com/blog/?p=584</guid>

					<description><![CDATA[<p>Introduction In this article, you will learn how to register Facebook OAuth App (Graph API) for data access using SSIS PowerPack REST API Connectors. Using SSIS PowerPack you can consume/manage Facebook data by calling Graph API. These connectors have drag and drop UI so you can do data integration without any coding (e.g. C#, Java, [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/register-facebook-oauth-app-graph-api/">How to register Facebook OAuth App for Graph API Access</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p>In this article, you will learn how to <strong>register Facebook OAuth App</strong> (<strong>Graph API</strong>) for data access using <a href="//zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a> REST API Connectors. Using SSIS PowerPack you can consume/manage Facebook data by calling Graph API. These connectors have drag and drop UI so you can do data integration without any coding (e.g. C#, Java, Python, Ruby).</p>
<p><a href="//zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">JSON /REST Source Connector</a> and <a href="//zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener">REST API Task</a> they both support a wide range of options for any type of REST API integration scenarios including Facebook REST API integration into your ETL Workflow. It also supports the use of OAuth 1.0 and 2.0 Protocols used by Twitter, Facebook, Google, LinkedIn, and many other popular Apis.</p>
<p><strong>Facebook Graph API</strong> can be used to read or manage Facebook data via REST API Calls. To access Graph API you will have to create OAuth App inside Facebook Developer Portal. Let&#8217;s take a look step by step.</p>
<h2>Step-By-Step: Create Facebook OAuth App (i.e Register OAuth App)</h2>
<ol>
<li>Go to www.facebook.com and log in with an account which you want to use to access Facebook data. You can access your own data using API without issue but if you have to access someone else data via App then it will require additional steps listed in this article in &#8220;Create Public Facebook OAuth App&#8221; section</li>
<li>Once you login to Facebook type <a href="https://developers.facebook.com/apps" target="_blank" rel="noopener">https://developers.facebook.com/apps</a> in the Address bar</li>
<li>Click on <strong>Create New App</strong>. If you never access developer portal then you may be prompted to Register as a developer.
<div id="attachment_6506" style="width: 730px" class="wp-caption aligncenter"><a href="//zappysys.com/blog/wp-content/uploads/2016/06/create-facebook-oauth-app-developer-graph-api-1.png" target="_blank" rel="noopener"><img fetchpriority="high" decoding="async" aria-describedby="caption-attachment-6506" class="wp-image-6506 size-large" src="https://zappysys.com/blog/wp-content/uploads/2016/06/create-facebook-oauth-app-developer-graph-api-1-1-1024x655.png" alt="create-facebook-oauth-app-developer-graph-api-1" width="720" height="461" srcset="https://zappysys.com/blog/wp-content/uploads/2016/06/create-facebook-oauth-app-developer-graph-api-1-1-1024x655.png 1024w, https://zappysys.com/blog/wp-content/uploads/2016/06/create-facebook-oauth-app-developer-graph-api-1-1-300x192.png 300w, https://zappysys.com/blog/wp-content/uploads/2016/06/create-facebook-oauth-app-developer-graph-api-1-1-768x491.png 768w, https://zappysys.com/blog/wp-content/uploads/2016/06/create-facebook-oauth-app-developer-graph-api-1-1.png 1047w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-6506" class="wp-caption-text">Create Facebook OAuth App for Graph API access (For SSIS PowerPack REST Connectors)</p></div></li>
<li>It creates the app by given name and asked you to choose some options like ads and FB login. Click on skip to skip that step.</li>
<li>Now go to basic settings and there you can change app name, contact email and select category (e.g. Business). There you can also found OAuth App ID and App Secret store it somewhere for the next phase.
<div id="attachment_6508" style="width: 730px" class="wp-caption aligncenter"><a href="//zappysys.com/blog/wp-content/uploads/2016/06/create-facebook-oauth-app-developer-graph-api-2.png" target="_blank" rel="noopener"><img decoding="async" aria-describedby="caption-attachment-6508" class="wp-image-6508 size-large" src="https://zappysys.com/blog/wp-content/uploads/2016/06/create-facebook-oauth-app-developer-graph-api-2-1-1024x719.png" alt="Register Facebook OAuth App for Custom Desktop Application (Basic Setup)" width="720" height="506" srcset="https://zappysys.com/blog/wp-content/uploads/2016/06/create-facebook-oauth-app-developer-graph-api-2-1-1024x719.png 1024w, https://zappysys.com/blog/wp-content/uploads/2016/06/create-facebook-oauth-app-developer-graph-api-2-1-300x211.png 300w, https://zappysys.com/blog/wp-content/uploads/2016/06/create-facebook-oauth-app-developer-graph-api-2-1-768x539.png 768w, https://zappysys.com/blog/wp-content/uploads/2016/06/create-facebook-oauth-app-developer-graph-api-2-1.png 1055w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-6508" class="wp-caption-text">Register Facebook OAuth App for Custom Desktop Application (Basic Setup)</p></div></li>
<li>No Click on Add Products and add Facebook Login. Because our app is used for SSIS PowerPack which has custom login flow (using Embedded Browser). We have to Add Facebook Login support and check Embedded browser option (see below).
<div id="attachment_6509" style="width: 730px" class="wp-caption aligncenter"><a href="//zappysys.com/blog/wp-content/uploads/2016/06/facebook-desktop-native-oauth-app-add-login-embedded-browser-support.png"><img decoding="async" aria-describedby="caption-attachment-6509" class="wp-image-6509 size-large" src="https://zappysys.com/blog/wp-content/uploads/2016/06/facebook-desktop-native-oauth-app-add-login-embedded-browser-support-1-1024x625.png" alt="Adding Embedded browser support for Facebook OAuth Application" width="720" height="439" srcset="https://zappysys.com/blog/wp-content/uploads/2016/06/facebook-desktop-native-oauth-app-add-login-embedded-browser-support-1-1024x625.png 1024w, https://zappysys.com/blog/wp-content/uploads/2016/06/facebook-desktop-native-oauth-app-add-login-embedded-browser-support-1-300x183.png 300w, https://zappysys.com/blog/wp-content/uploads/2016/06/facebook-desktop-native-oauth-app-add-login-embedded-browser-support-1-768x468.png 768w, https://zappysys.com/blog/wp-content/uploads/2016/06/facebook-desktop-native-oauth-app-add-login-embedded-browser-support-1.png 1041w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-6509" class="wp-caption-text">Adding Embedded browser support for Facebook OAuth Application</p></div></li>
<li>Now you ready to use your App to use OAuth App ID and App Secret.</li>
</ol>
<h2>Test Facebook OAuth App (Consume graph api in SSIS)</h2>
<p>If you using SSIS PowerPack to manage your Facebook data using Graph API then perform the following steps to test your connectivity.</p>
<ol>
<li>In the SSIS Designer in connection manager page .. right click and add ZS-OAUTH</li>
<li>Select Facebook provider, Configure App ID and OAuth App Secret</li>
<li>Select Permission (i.e. Scope) or type by hand (1 per each line)</li>
<li>Click generate Token. You will be redirected to login page and then it will show Authorize App confirmation. Click Accept.</li>
<li>Test Connection (If things go well it will show green success)
<div id="attachment_588" style="width: 610px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2016/06/ssis-facebook-test-oauth-connection-graph-api.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-588" class="wp-image-588" src="//zappysys.com/blog/wp-content/uploads/2016/06/ssis-facebook-test-oauth-connection-graph-api.png" alt="Testing Facebook OAuth Connectivity in SSIS (Use Graph API)" width="600" height="384" srcset="https://zappysys.com/blog/wp-content/uploads/2016/06/ssis-facebook-test-oauth-connection-graph-api.png 957w, https://zappysys.com/blog/wp-content/uploads/2016/06/ssis-facebook-test-oauth-connection-graph-api-300x192.png 300w" sizes="(max-width: 600px) 100vw, 600px" /></a><p id="caption-attachment-588" class="wp-caption-text">Testing Facebook OAuth Connectivity in SSIS (Use Graph API)</p></div></li>
</ol>
<h2>Fetch from Facebook Graph API (Load data into SQL Server)</h2>
<p>Below is sample screenshot how you can use JSON Source to pull data from Facebook REST API and load into SQL Server. <a href="//zappysys.com/blog/get-data-from-facebook-in-ssis-using-rest-api/" target="_blank" rel="noopener">Refer this article</a> for step-by-step information.</p>
<div id="attachment_587" style="width: 710px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2016/06/extract-data-from-facebook-graph-rest-api-use-oauth-load-sql-server.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-587" class="wp-image-587" src="//zappysys.com/blog/wp-content/uploads/2016/06/extract-data-from-facebook-graph-rest-api-use-oauth-load-sql-server.png" alt="Extract data from Facebook using Graph API (SSIS JSON/REST API Connector) - Load into SQL Server Table" width="700" height="508" srcset="https://zappysys.com/blog/wp-content/uploads/2016/06/extract-data-from-facebook-graph-rest-api-use-oauth-load-sql-server.png 889w, https://zappysys.com/blog/wp-content/uploads/2016/06/extract-data-from-facebook-graph-rest-api-use-oauth-load-sql-server-300x218.png 300w" sizes="(max-width: 700px) 100vw, 700px" /></a><p id="caption-attachment-587" class="wp-caption-text">Extract data from Facebook using Graph API (SSIS JSON/REST API Connector) &#8211; Load into SQL Server Table</p></div>
<p>The post <a href="https://zappysys.com/blog/register-facebook-oauth-app-graph-api/">How to register Facebook OAuth App for Graph API Access</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to register Google OAuth Application (Get ClientID and ClientSecret)</title>
		<link>https://zappysys.com/blog/register-google-oauth-application-get-clientid-clientsecret/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Sat, 09 Apr 2016 21:25:18 +0000</pubDate>
				<category><![CDATA[Google API]]></category>
		<category><![CDATA[google api]]></category>
		<category><![CDATA[json source]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[oauth2]]></category>
		<category><![CDATA[OAuthApp]]></category>
		<category><![CDATA[rest api]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[xml source]]></category>
		<guid isPermaLink="false">http://zappysys.com/blog/?p=431</guid>

					<description><![CDATA[<p>Introduction In our previous article we understood little bit about OAuth 2.0 Protocol. We talked how to use Default App for ease of use. However In this post you will learn how to register Google OAuth Application so you can access various Google Services programmatically (e.g Youtube, Google Analytics, AdWords, DoubleClick etc.). Here is the [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/register-google-oauth-application-get-clientid-clientsecret/">How to register Google OAuth Application (Get ClientID and ClientSecret)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p>In our previous article we understood little bit about <a href="https://zappysys.com/blog/rest-api-authentication-with-oauth-2-0-using-ssis/" target="_blank" rel="noopener">OAuth 2.0 Protocol</a>. We talked how to use Default App for ease of use. However In this post you will learn <strong>how to register Google OAuth Application</strong> so you can access various Google Services programmatically (e.g Youtube, Google Analytics, AdWords, DoubleClick etc.). Here is the link to find all services: <a href="https://developers.google.com/oauthplayground/" target="_blank" rel="noopener">Google API Services (Using OAuth 2.0)</a></p>
<p>Recently google started supporting <a href="https://developers.google.com/identity/protocols/OAuth2" target="_blank" rel="noopener">OAuth 2.0</a> Protocol. There are many articles written explaining OAuth 2.0 protocol so we are not going to cover that in this article.</p>
<p>Following SSIS Connectors support OAuth Connectivity. When you use below connectors no coding required to pull data from OAuth enabled services.</p>
<p><strong>SSIS Tasks / Components which Supports OAuth Connection / Google API</strong></p>
<div class="su-table su-table-alternate">
<table>
<tbody>
<tr>
<td width="36"><img decoding="async" src="//zappysys.com/onlinehelp/ssis-powerpack/scr/images/api-source/ssis-api-source.png" alt="Custom SSIS Tasks - API Source" width="32" /></td>
<td><a href="/products/ssis-powerpack/ssis-api-source/" target="_blank" rel="noopener">API Source</a></td>
</tr>
<tr>
<td width="36"><img decoding="async" src="//zappysys.com/onlinehelp/ssis-powerpack/scr/images/google-analytics-source/ssis-google-analytics-source.png" alt="Custom SSIS Tasks - Google Analytics Source" width="32" /></td>
<td><a href="//zappysys.com/products/ssis-powerpack/ssis-google-analytics-source-connector/" target="_blank" rel="noopener">Google Analytics Source</a></td>
</tr>
<tr>
<td width="36"><img decoding="async" src="//zappysys.com/images/ssis-powerpack/SSIS-Json-Source-Adapter.png" alt="Custom SSIS Components - JSON Source (File and REST API Connector)" width="32" /></td>
<td><a href="//zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">JSON Source Connector (File, REST API)</a></td>
</tr>
<tr>
<td width="36"><img decoding="async" src="//zappysys.com/images/ssis-powerpack/ssis-rest-api-web-service-task.png" alt="Custom SSIS Tasks - Call REST API Webservice (GET, POST, DELETE etc)" width="32" /></td>
<td><a href="//zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener">REST API Webservice Task</a></td>
</tr>
<tr>
<td width="36"><img decoding="async" src="//zappysys.com/images/ssis-powerpack/ssis-xml-source.png" alt="Custom SSIS Components - XML Source (File, REST, SOAP)" width="32" /></td>
<td><a href="//zappysys.com/products/ssis-powerpack/ssis-xml-source/" target="_blank" rel="noopener">XML Source (File, REST, SOAP)</a></td>
</tr>
<tr>
<td width="36"><img decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/web-api-destination/ssis-web-api-destination.png" alt="SSIS Web API destination" width="32" /></td>
<td><a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">Web API Destination</a></td>
</tr>
</tbody>
</table>
</div>
<p><strong>ODBC Drivers which Supports OAuth Connection / Google API (Call in Power BI, Excel, Informatica, MS Access)</strong></p>
<div class="su-table su-table-alternate">
<table>
<tbody>
<tr>
<td width="36"><img decoding="async" src="https://zappysys.com/images/odbc-powerpack/odbc-api-driver.png" alt="API ODBC Driver" width="32" /></td>
<td><a href="https://zappysys.com/products/odbc-powerpack/odbc-api-driver/" target="_blank" rel="noopener">API ODBC Driver</a></td>
</tr>
<tr>
<td width="36"><img decoding="async" src="https://zappysys.com/images/odbc-powerpack/odbc-json-api-driver.png" alt="JSON ODBC Driver" width="32" /></td>
<td><a href="https://zappysys.com/products/odbc-powerpack/odbc-json-rest-api-driver/" target="_blank" rel="noopener">JSON ODBC Driver</a></td>
</tr>
<tr>
<td width="36"><img decoding="async" src="https://zappysys.com/images/odbc-powerpack/odbc-xml-api-driver.png" alt="XML ODBC Driver" width="32" /></td>
<td><a href="https://zappysys.com/products/odbc-powerpack/odbc-xml-soap-api-driver/" target="_blank" rel="noopener">XML ODBC Driver</a></td>
</tr>
<tr>
<td width="36"><img decoding="async" src="https://zappysys.com/images/odbc-powerpack/odbc-csv-api-driver.png" alt="CSV ODBC Driver" width="32" /></td>
<td><a href="https://zappysys.com/products/odbc-powerpack/odbc-csv-rest-api-driver/" target="_blank" rel="noopener">CSV ODBC Driver</a></td>
</tr>
</tbody>
</table>
</div>
<h2>Create Google Project</h2>
<p>Registering OAuth App in Google first requires you to create API Project. API Project is a container which can host many OAuth Apps or other API Keys.</p>
<ol>
<li>To create API Project Visit <a href="https://console.developers.google.com/project" target="_blank" rel="noopener">https://console.developers.google.com/project</a><br />
If you already have existing API Project then once you click above link you can pick desired API Project from dropdown (Found in the top bar). If you using existing API Project then you may skip next few steps and directly move to step which explains [how to create OAuth ClientId].</li>
<li>To create new project Click on <strong>&#8220;Create Project&#8221;</strong> button. Once you click Create it will take few seconds to create project for you.
<div id="attachment_434" style="width: 394px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2016/04/google-api-create-new-project-for-oauth-app.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-434" class="size-full wp-image-434" src="https://zappysys.com/blog/wp-content/uploads/2016/04/google-api-create-new-project-for-oauth-app.png" alt="Create New Google API Project (Google API - Register new OAuth App)" width="384" height="260" srcset="https://zappysys.com/blog/wp-content/uploads/2016/04/google-api-create-new-project-for-oauth-app.png 384w, https://zappysys.com/blog/wp-content/uploads/2016/04/google-api-create-new-project-for-oauth-app-300x203.png 300w" sizes="(max-width: 384px) 100vw, 384px" /></a><p id="caption-attachment-434" class="wp-caption-text">Create New Google API Project (Google API &#8211; Register new OAuth App)</p></div></li>
<li>Now give some friendly name and change default Project ID (optional) for your project and click Create (See below).<br />
<strong><br />
NOTE:</strong> Before you click create you can <strong>change default Project ID</strong> suggested by Google by clicking <strong>Edit</strong>. This Project ID is used everywhere when calling many APIs <a href="https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query" target="_blank" rel="noopener">like this one</a> so copy this ID somewhere (You can also see this on project screen so dont worry if you miss it).Project ID is unique across google system so you may not get your preferred ID but if you can get one then its easy to remember for sure.</p>
<div id="attachment_441" style="width: 385px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2016/04/google-api-create-new-project-for-oauth-app-2.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-441" class="size-full wp-image-441" src="//zappysys.com/blog/wp-content/uploads/2016/04/google-api-create-new-project-for-oauth-app-2.png" alt="Create new Google Api Project for OAuth App (Set project name)" width="375" height="271" srcset="https://zappysys.com/blog/wp-content/uploads/2016/04/google-api-create-new-project-for-oauth-app-2.png 375w, https://zappysys.com/blog/wp-content/uploads/2016/04/google-api-create-new-project-for-oauth-app-2-300x217.png 300w" sizes="(max-width: 375px) 100vw, 375px" /></a><p id="caption-attachment-441" class="wp-caption-text">Create new Google Api Project for OAuth App (Set project name / edit default project ID)</p></div></li>
</ol>
<h2>Enable Google API for Integration</h2>
<p>Once your Project is created, next step is enable APIs you like to call. By default most Google APIs are disabled so make sure you enable each APi category manually using below steps.</p>
<ol>
<li>Once project is created it will redirect you to the API Home page where you will see many common Google API you can use.If you do not see that you can always click below option to enable API manually.Visit : <a href="https://console.cloud.google.com/apis/library" target="_blank" rel="noopener">https://console.cloud.google.com/apis/library</a>
<div id="attachment_8446" style="width: 722px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2016/04/enable-google-api-services.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8446" class="size-full wp-image-8446" src="https://zappysys.com/blog/wp-content/uploads/2016/04/enable-google-api-services.png" alt="Enable Google APIs / Services" width="712" height="418" srcset="https://zappysys.com/blog/wp-content/uploads/2016/04/enable-google-api-services.png 712w, https://zappysys.com/blog/wp-content/uploads/2016/04/enable-google-api-services-300x176.png 300w" sizes="(max-width: 712px) 100vw, 712px" /></a><p id="caption-attachment-8446" class="wp-caption-text">Enable Google APIs / Services</p></div></li>
<li>By default API you like to call might not be enabled. Search for API you wish to enable, click on the API name and <strong>click Enable</strong>.<span style="text-decoration: underline;">Some common Google API Examples:</span>
<ol>
<li>To enable <strong>Google YouTube API</strong><br />
&gt; search for &#8220;<a href="https://console.cloud.google.com/apis/library?q=youtube" target="_blank" rel="noopener">YouTube</a>&#8220;. It has few APIs so pick the one you need under this,<br />
&gt; For example To manage/view channel use Data API, for Reporting use Analytics API)</li>
<li>To enable <strong>Google Drive API</strong><br />
search for &#8220;<a href="https://console.cloud.google.com/apis/library?q=drive" target="_blank" rel="noopener">Drive</a>&#8221; and click Enable</li>
<li>To enable <strong>Google Sheets API</strong><br />
search for &#8220;<a href="https://console.cloud.google.com/apis/library?q=sheet" target="_blank" rel="noopener">Sheet</a>&#8221; (Some Sheets API operations need Drive API too see enable that as well)</li>
<li>To enable <strong>Google BigQuery API</strong><br />
&gt; search for &#8220;<a href="https://console.cloud.google.com/apis/library?q=bigquery" target="_blank" rel="noopener">BigQuery</a><strong>&#8220;</strong></li>
<li>To enable <strong>Google Analytics (GA3)</strong><br />
&gt; search <strong>&#8220;</strong><a href="https://console.cloud.google.com/apis/library?q=analytics" target="_blank" rel="noopener">Analytics</a><strong>&#8220;</strong> and enable <em>Google Analytics API</em></li>
<li>To enable <strong>Google Analytics (GA4)</strong><br />
&gt; search for <em>Google Analytics Data API</em> and click Enable, Search for <em>Google Analytics Admin API</em> and click enable (needed this to query available properties)</p>
<div id="attachment_440" style="width: 481px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2016/04/google-api-project-enable-api-screen.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-440" class="size-full wp-image-440" src="//zappysys.com/blog/wp-content/uploads/2016/04/google-api-project-enable-api-screen.png" alt="Enable Google API for OAuth Application Access (register Google OAuth Application)" width="471" height="356" srcset="https://zappysys.com/blog/wp-content/uploads/2016/04/google-api-project-enable-api-screen.png 471w, https://zappysys.com/blog/wp-content/uploads/2016/04/google-api-project-enable-api-screen-300x227.png 300w" sizes="(max-width: 471px) 100vw, 471px" /></a><p id="caption-attachment-440" class="wp-caption-text">Search Google API for OAuth Application Access</p></div>
<p>&nbsp;</p>
<div id="attachment_439" style="width: 444px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2016/04/google-api-project-enable-api-screen-2.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-439" class="size-full wp-image-439" src="//zappysys.com/blog/wp-content/uploads/2016/04/google-api-project-enable-api-screen-2.png" alt="Enable Google API for OAuth Application Access (register Google OAuth Application)" width="434" height="193" srcset="https://zappysys.com/blog/wp-content/uploads/2016/04/google-api-project-enable-api-screen-2.png 434w, https://zappysys.com/blog/wp-content/uploads/2016/04/google-api-project-enable-api-screen-2-300x133.png 300w" sizes="(max-width: 434px) 100vw, 434px" /></a><p id="caption-attachment-439" class="wp-caption-text">Enable Google API for OAuth Application Access</p></div>
<p>&nbsp;</li>
</ol>
</li>
</ol>
<h2>Create OAuth Credentials (Client ID / Secret)</h2>
<p>Once we create project and enable APIs our next step is to obtain OAuth ClientID / Secret. Before you can obtain that you have to configure few properties of your OAuth Consent Screen. Most fields are optional on this screen but fill out them if you plan to publish this API App for other users (i.e. Public App).</p>
<ol>
<li>Now click on the credentials tab and click &#8220;OAuth consent screen&#8221;. Fill out necessary information which will be visible to the user (such as App Name). Once you are done, continue on with credentials creation:<img loading="lazy" decoding="async" class="wp-image-9916 size-full" src="https://zappysys.com/blog/wp-content/uploads/2016/04/google-configure-api-oauth-consent-screen.png" alt="" width="806" height="906" srcset="https://zappysys.com/blog/wp-content/uploads/2016/04/google-configure-api-oauth-consent-screen.png 806w, https://zappysys.com/blog/wp-content/uploads/2016/04/google-configure-api-oauth-consent-screen-267x300.png 267w, https://zappysys.com/blog/wp-content/uploads/2016/04/google-configure-api-oauth-consent-screen-768x863.png 768w" sizes="(max-width: 806px) 100vw, 806px" />Google OAuth API &#8211; Create OAuth App &#8211; Set Application Name on Consent Screen</li>
<li>Click on [Create credentials] button and select OAuth Client Id option.
<div id="attachment_438" style="width: 855px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2016/04/google-api-create-oauth-credentials.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-438" class="wp-image-438 size-full" src="//zappysys.com/blog/wp-content/uploads/2016/04/google-api-create-oauth-credentials.png" alt="Create OAuth Client ID Credentials for Google API access" width="845" height="519" srcset="https://zappysys.com/blog/wp-content/uploads/2016/04/google-api-create-oauth-credentials.png 845w, https://zappysys.com/blog/wp-content/uploads/2016/04/google-api-create-oauth-credentials-300x184.png 300w" sizes="(max-width: 845px) 100vw, 845px" /></a><p id="caption-attachment-438" class="wp-caption-text">Create OAuth Client ID Credentials for Google API access</p></div></li>
<li>Next you will be asked to select Application Type. Pick &#8220;<strong>Desktop app</strong>&#8221; if your Application is Desktop style application. If your app is web site or running browser then pick Web Application. Click on Create and you will see your ClientID and ClientSecret which you can use during OAuth Authentication. <strong>Keep these both information secret</strong>. This is used to call OAuth Approval Screen by your Desktop App or Web App&#8230; and then user can obtain Token which can be used to call desired Google API.<div class="su-note"  style="border-color:#e5de9d;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:#FFF8B7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;">NOTE: Make sure you do not choose Web App and only select Desktop App. Desktop App doesnt have Redirect URL making it simple to setup and use with ZappySys software.</div></div>
<div id="attachment_9229" style="width: 732px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2016/04/create-google-oauth-credentials-new-desktop-application.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9229" class="size-full wp-image-9229" src="https://zappysys.com/blog/wp-content/uploads/2016/04/create-google-oauth-credentials-new-desktop-application.png" alt="Create Google OAuth 2.0 Credentials - Desktop App" width="722" height="445" srcset="https://zappysys.com/blog/wp-content/uploads/2016/04/create-google-oauth-credentials-new-desktop-application.png 722w, https://zappysys.com/blog/wp-content/uploads/2016/04/create-google-oauth-credentials-new-desktop-application-300x185.png 300w" sizes="(max-width: 722px) 100vw, 722px" /></a><p id="caption-attachment-9229" class="wp-caption-text">Create Google OAuth 2.0 Credentials &#8211; Desktop App</p></div>
<div id="attachment_444" style="width: 617px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2016/04/api-client-generate-google-oauth-app-clientid-client-secret.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-444" class="size-full wp-image-444" src="//zappysys.com/blog/wp-content/uploads/2016/04/api-client-generate-google-oauth-app-clientid-client-secret.png" alt="Generate ClientID and Client Secret for Google OAuth Application (register Google OAuth Application)" width="607" height="402" srcset="https://zappysys.com/blog/wp-content/uploads/2016/04/api-client-generate-google-oauth-app-clientid-client-secret.png 607w, https://zappysys.com/blog/wp-content/uploads/2016/04/api-client-generate-google-oauth-app-clientid-client-secret-300x199.png 300w" sizes="(max-width: 607px) 100vw, 607px" /></a><p id="caption-attachment-444" class="wp-caption-text">Generate ClientID and Client Secret for Google OAuth Application</p></div></li>
</ol>
<h2>Publish App</h2>
<p>The last step in App creation is to go to the OAuth Consent Screen tab. Under Publishing Status, click PUBLISH APP to ensure your refresh token doesn&#8217;t expire often. If you plan to use the App for Private use, you do not have to worry about the Verification Status after Publishing (Which is the case for most users who access their own data).</p>
<div id="attachment_11084" style="width: 606px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2016/04/google-publish-oauth-app-refresh-token-expires-every-7-days.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11084" class="size-full wp-image-11084" src="https://zappysys.com/blog/wp-content/uploads/2016/04/google-publish-oauth-app-refresh-token-expires-every-7-days.png" alt="Publish Google App (This avoids Refresh Token Expiration every 7 days)" width="596" height="562" srcset="https://zappysys.com/blog/wp-content/uploads/2016/04/google-publish-oauth-app-refresh-token-expires-every-7-days.png 596w, https://zappysys.com/blog/wp-content/uploads/2016/04/google-publish-oauth-app-refresh-token-expires-every-7-days-300x283.png 300w" sizes="(max-width: 596px) 100vw, 596px" /></a><p id="caption-attachment-11084" class="wp-caption-text">Publish Google App (This avoids Refresh Token Expiration every 7 days)</p></div>
<h2>Using Client ID and Client Secret in ZappySys OAuth Connection</h2>
<p>You can use generated ClientID and ClientSecret to initiate OAuth Authorization process. We are not going to cover how that works, but below is a simple screenshot of how these two pieces of information are used to call the Consent screen with some desired permission requested by calling Application:</p>
<p>ZappySys OAuth Connection can be used by many components suggested in the beginning of this article. So refer them for more information.</p>
<div id="attachment_6855" style="width: 930px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2016/04/ssis-oauth-connection-manager-generate-access-token.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6855" class="wp-image-6855 size-full" src="https://zappysys.com/blog/wp-content/uploads/2016/04/ssis-oauth-connection-manager-generate-access-token.png" alt="" width="920" height="1032" srcset="https://zappysys.com/blog/wp-content/uploads/2016/04/ssis-oauth-connection-manager-generate-access-token.png 920w, https://zappysys.com/blog/wp-content/uploads/2016/04/ssis-oauth-connection-manager-generate-access-token-267x300.png 267w, https://zappysys.com/blog/wp-content/uploads/2016/04/ssis-oauth-connection-manager-generate-access-token-768x861.png 768w, https://zappysys.com/blog/wp-content/uploads/2016/04/ssis-oauth-connection-manager-generate-access-token-913x1024.png 913w" sizes="(max-width: 920px) 100vw, 920px" /></a><p id="caption-attachment-6855" class="wp-caption-text">Google OAuth Application: Generating Access and Refresh tokens using SSIS and OAuth Connection Manager.</p></div>
<h2>Using System Default Browser to get the token</h2>
<p>If embedded browser has some issue to extract your token then you can close the window by pressing <strong>[X]</strong> in the title bar. Once you do that you will be prompted to use System Default browser to finish the token extraction. If you click Yes then Full browser will be launched.</p>
<p><strong>NOTE:</strong> Below feature is added in version published after Dec 31, 2019 (v3.0.0.11231 or later) so make sure you have latest version.</p>
<div id="attachment_8782" style="width: 570px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2016/04/use-system-browser-flow.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8782" class="size-full wp-image-8782" src="https://zappysys.com/blog/wp-content/uploads/2016/04/use-system-browser-flow.png" alt="Using System Default Browser to extract OAuth Token" width="560" height="287" srcset="https://zappysys.com/blog/wp-content/uploads/2016/04/use-system-browser-flow.png 560w, https://zappysys.com/blog/wp-content/uploads/2016/04/use-system-browser-flow-300x154.png 300w" sizes="(max-width: 560px) 100vw, 560px" /></a><p id="caption-attachment-8782" class="wp-caption-text">Using System Default Browser to extract OAuth Token</p></div>
<h3>Untrusted App Warning</h3>
<p>Sometimes Google might show you below warning. In order to continue the flow you might have to Click on <strong>Advanced</strong> and then click <strong>Go to YourAppName (unsafe)</strong> like below</p>
<p>&nbsp;</p>
<div id="attachment_8779" style="width: 658px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2016/04/google-oauth-app-not-trusted.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8779" class="size-full wp-image-8779" src="https://zappysys.com/blog/wp-content/uploads/2016/04/google-oauth-app-not-trusted.png" alt="How to ignore Google Unsafe App Warning (OAuth Flow)" width="648" height="455" srcset="https://zappysys.com/blog/wp-content/uploads/2016/04/google-oauth-app-not-trusted.png 648w, https://zappysys.com/blog/wp-content/uploads/2016/04/google-oauth-app-not-trusted-300x211.png 300w" sizes="(max-width: 648px) 100vw, 648px" /></a><p id="caption-attachment-8779" class="wp-caption-text">How to ignore Google Unsafe App Warning (OAuth Flow)</p></div>
<p>&nbsp;</p>
<p><strong>OR, in some cases, you may see modern UI like below. In either case, <span style="text-decoration: underline;">choose continue</span>.</strong></p>
<p>&nbsp;</p>
<div id="attachment_11087" style="width: 524px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2016/04/google-app-not-verfied-new.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11087" class="size-full wp-image-11087" src="https://zappysys.com/blog/wp-content/uploads/2016/04/google-app-not-verfied-new.png" alt="Google App not Verified Warning (New UI)" width="514" height="397" srcset="https://zappysys.com/blog/wp-content/uploads/2016/04/google-app-not-verfied-new.png 514w, https://zappysys.com/blog/wp-content/uploads/2016/04/google-app-not-verfied-new-300x232.png 300w" sizes="(max-width: 514px) 100vw, 514px" /></a><p id="caption-attachment-11087" class="wp-caption-text">Google App not Verified Warning (New UI)</p></div>
<p>&nbsp;</p>
<h3>Select the account</h3>
<div id="attachment_8780" style="width: 939px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2016/04/use-system-browser-for-oauth-token-extract.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8780" class="size-full wp-image-8780" src="https://zappysys.com/blog/wp-content/uploads/2016/04/use-system-browser-for-oauth-token-extract.png" alt="Using System Browser" width="929" height="699" srcset="https://zappysys.com/blog/wp-content/uploads/2016/04/use-system-browser-for-oauth-token-extract.png 929w, https://zappysys.com/blog/wp-content/uploads/2016/04/use-system-browser-for-oauth-token-extract-300x226.png 300w, https://zappysys.com/blog/wp-content/uploads/2016/04/use-system-browser-for-oauth-token-extract-768x578.png 768w" sizes="(max-width: 929px) 100vw, 929px" /></a><p id="caption-attachment-8780" class="wp-caption-text">Using System Browser</p></div>
<h3>Copy code and finish the flow</h3>
<div id="attachment_8786" style="width: 1135px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/06/manually-extract-oauth-token-use-full-browser.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8786" class="size-full wp-image-8786" src="https://zappysys.com/blog/wp-content/uploads/2017/06/manually-extract-oauth-token-use-full-browser.png" alt="Manually Copy Code and Get OAuth Refresh / Access Token" width="1125" height="672" srcset="https://zappysys.com/blog/wp-content/uploads/2017/06/manually-extract-oauth-token-use-full-browser.png 1125w, https://zappysys.com/blog/wp-content/uploads/2017/06/manually-extract-oauth-token-use-full-browser-300x179.png 300w, https://zappysys.com/blog/wp-content/uploads/2017/06/manually-extract-oauth-token-use-full-browser-768x459.png 768w, https://zappysys.com/blog/wp-content/uploads/2017/06/manually-extract-oauth-token-use-full-browser-1024x612.png 1024w" sizes="(max-width: 1125px) 100vw, 1125px" /></a><p id="caption-attachment-8786" class="wp-caption-text">Manually Copy Code and Get OAuth Refresh / Access Token</p></div>
<p>&nbsp;</p>
<h2>Why I didn&#8217;t get refresh token back?</h2>
<p>For some reason if you just see Access token and not refresh token then try following</p>
<ol>
<li>Logout current session in browser and close all browser windows and try again</li>
<li>If you use <strong>Custom</strong> Provider rather than Google on OAuth connection then change Auth URL to include prompt and access_type like below<br />
<pre class="crayon-plain-tag">https://accounts.google.com/o/oauth2/auth?access_type=offline&amp;prompt=consent</pre>
</li>
</ol>
<h2>What to do if Google Refresh Token expires every 7 days</h2>
<p>Technically, once you have a refresh token, you should not worry about renewing as long as the API call is made atleast once every few months (max 6 months idle time). However, in some cases, your refresh token can expire sooner, and you have to click Generate Token manually</p>
<p>One main reason that is not well documented is if the Google Oauth Private App you created to access your own data is still in &#8220;<strong>testing</strong>&#8221; mode and not &#8220;<strong>published</strong>,&#8221; then as per Google, <a href="https://developers.google.com/google-ads/api/docs/get-started/common-errors">you may get this error</a>. Perform these steps to publish your app, which is in testing mode, so you do not have to renew the refresh token every 7 days.</p>
<ol>
<li>Go to your Project in Google API console<br />
Generally here</li>
<li>No API call has been made using the generated refresh_token for six months or longer<br />
<strong>SOLUTION: </strong> Make at least some API in six months to keep refresh_token active</li>
<li>Your OAuth App is in &#8220;testing&#8221; status and not published yet<br />
<strong>SOLUTION:</strong> Just click the <strong>Publish</strong> button on your App OAuth Consent screen. Do not worry about getting verified if you plan to use it for internal use; after this step, your refresh_token may not expire every 7 days <a href="https://stackoverflow.com/questions/8953983/do-google-refresh-tokens-expire" target="_blank" rel="noopener">See this thread</a>.<strong>DO NOT WORRY ABOUT GETTING VERIFIED</strong> &#8211; Just publish it to avoid refresh token expiration every 7 days.</p>
<div id="attachment_11084" style="width: 606px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2016/04/google-publish-oauth-app-refresh-token-expires-every-7-days.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11084" class="size-full wp-image-11084" src="https://zappysys.com/blog/wp-content/uploads/2016/04/google-publish-oauth-app-refresh-token-expires-every-7-days.png" alt="Publish Google App (This avoids Refresh Token Expiration every 7 days) " width="596" height="562" srcset="https://zappysys.com/blog/wp-content/uploads/2016/04/google-publish-oauth-app-refresh-token-expires-every-7-days.png 596w, https://zappysys.com/blog/wp-content/uploads/2016/04/google-publish-oauth-app-refresh-token-expires-every-7-days-300x283.png 300w" sizes="(max-width: 596px) 100vw, 596px" /></a><p id="caption-attachment-11084" class="wp-caption-text">Publish Google App (This avoids Refresh Token Expiration every 7 days)</p></div></li>
</ol>
<p>&nbsp;</p>
<h2>What is Google OAuth AccessToken</h2>
<p><strong>AccessToken</strong> is short lived token which you can pass along with each API Service call. once this token is expired you can get new <strong>AccessToken</strong> as long as you have obtained and saved <strong>RefreshToken</strong> (Returned to caller after very first time user go through Approval process on Consent screen). If you are using <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-oauth-connection-manager.htm" target="_blank" rel="noopener">ZappySys OAuth connection manager</a></p>
<h2>What is Google OAuth RefreshToken</h2>
<p>May OAuth services support short lived token which expires after few minutes or hours. Google API by default expires token after 3600 seconds &#8230; So how to get new token ? Do you always go through that annoying Consent screen&#8230; what if your application is Automated Service? Well OAuth has solution for that too&#8230; its called RefreshToken.</p>
<p>First time to setup OAuth connection user have to go through Approval screen  (i.e. Consent screen) once they click Approve button they may receive two types of token (AccessToken and RefreshToken).  RefreshToken is used only when you need to get new AccessToken without going through Consent screen. So technically if OAuth supports RefreshToken (This is optional) then you can Save this piece of information in database somewhere and when you get token_expired error or you detect expiration time you can get new AccessToken without involving user consent (because you already did once).</p>
<h2>Conclusion</h2>
<p>Hope this article helped you to understand how to <strong>register Google OAuth Application</strong>. Download <a href="//zappysys.com/products/ssis-powerpack/">SSIS PowerPack</a> to try various <strong>OAuth data integration scenarios</strong> using drag and drop high performance connectors. With <a href="//zappysys.com/products/ssis-powerpack/ssis-json-file-source/">SSIS PowerPack OAuth support</a> you can virtually pull data from any API service (<a href="//zappysys.com/products/ssis-powerpack/ssis-xml-source/">XML REST API</a> or <a href="//zappysys.com/products/ssis-powerpack/ssis-json-file-source/">JSON REST API</a>). Such as Facbook, Twitter, SurveyMonkey, LinkedIn and many more.</p>
<p>The post <a href="https://zappysys.com/blog/register-google-oauth-application-get-clientid-clientsecret/">How to register Google OAuth Application (Get ClientID and ClientSecret)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to read Twitter data in SSIS using REST API Call</title>
		<link>https://zappysys.com/blog/read-twitter-data-in-ssis-using-rest-api-task-json-source-oauth2/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Thu, 22 Oct 2015 16:09:00 +0000</pubDate>
				<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[SSIS REST API Task]]></category>
		<category><![CDATA[API Integration]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[json source]]></category>
		<category><![CDATA[looping]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[oauth2]]></category>
		<category><![CDATA[OAuthApp]]></category>
		<category><![CDATA[rest api]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[twitter]]></category>
		<guid isPermaLink="false">http://zappysys.com/blog/?p=93</guid>

					<description><![CDATA[<p>Introduction In this article you will how to Read Twitter data in SSIS using SSIS JSON Source and SSIS REST API Web Service Task. You will also learn about latest OAuth 2.0 Protocol to simplify REST API access. Twitter REST API Authentication In order to fetch any data from twitter using OAuth REST API calls [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/read-twitter-data-in-ssis-using-rest-api-task-json-source-oauth2/">How to read Twitter data in SSIS using REST API Call</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><a href="//zappysys.com/blog/wp-content/uploads/2015/10/twitter-api-integration.png"><img loading="lazy" decoding="async" class="alignleft wp-image-1660" src="//zappysys.com/blog/wp-content/uploads/2015/10/twitter-api-integration.png" alt="" width="180" height="146" /></a>In this article you will <em>how to Read Twitter data in SSIS</em> using <a href="//zappysys.com/products/ssis-powerpack/ssis-json-file-source/">SSIS JSON Source</a> and <a href="//zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/">SSIS REST API Web Service Task</a>. You will also learn about latest OAuth 2.0 Protocol to simplify REST API access.</p>
<h2>Twitter REST API Authentication</h2>
<p>In order to fetch any data from twitter using OAuth REST API calls you have to obtain two Keys (Consumer Key [Like UserID] and Consumer Secret [Like Password]). There are mainly two methods to read data from Twitter. Using <strong>Application-user authentication</strong> and <strong>Application Only authentication</strong>. Use correct method depending what type of information you want to pull from twitter. Most common method is <strong>Application-user authentication</strong> . If you want to read more about other methods then <a href="https://developer.twitter.com/en/docs/basics/authentication/overview" target="_blank" rel="noopener">click here</a></p>
<h2>Method 1 &#8211; Read Twitter data in SSIS using Application-user authentication</h2>
<p>In this method you will need twitter user account to connect Twitter API. Once first time authorization is done you don&#8217;t have to re-authenticate. Certain type of API calls only allowed by this method (such as POST new tweet using API). For any API call in Twitter very first step is create OAuth App (i.e. Register new App in Twitter developer portal).</p>
<h3>Using Default OAuth App Created by ZappySys</h3>
<p>To make your life easy ZappySys provides default App for certain OAuth providers (e.g. Google, Twitter). If you decide to create your own app for whatever reason then check next section on how to register twitter OAuth Application. See below screenshot how to use Twitter OAuth connection using Default App. Once you click Generate Token it will prompt you to login using Twitter account and then you can grant permission.</p>
<p><strong>Step-By-Step</strong></p>
<ol>
<li>Download and Install <a href="//zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack FREE Trial</a> from <a href="//zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">this link</a></li>
<li>Create new SSIS Project and add new package.</li>
<li>Open Package. Go to control flow. Drag and drop Data Flow task from SSIS Toolbox
<div id="attachment_8028" style="width: 470px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/02/drag-and-drop-data-flow-task.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8028" class="size-full wp-image-8028" src="https://zappysys.com/blog/wp-content/uploads/2019/02/drag-and-drop-data-flow-task.png" alt="" width="460" height="155" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/drag-and-drop-data-flow-task.png 460w, https://zappysys.com/blog/wp-content/uploads/2019/02/drag-and-drop-data-flow-task-300x101.png 300w" sizes="(max-width: 460px) 100vw, 460px" /></a><p id="caption-attachment-8028" class="wp-caption-text">Dragging and dropping Data Flow Task into Control Flow</p></div></li>
<li>Go to Data flow designer.Drag and drop ZS JSON Source Component and double on it to configure it.
<div id="attachment_3766" style="width: 604px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3766" class="size-full wp-image-3766" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin.png" alt="Drag and Drop JSON Source Component" width="594" height="268" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin.png 594w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin-300x135.png 300w" sizes="(max-width: 594px) 100vw, 594px" /></a><p id="caption-attachment-3766" class="wp-caption-text">Drag and Drop JSON Source Component</p></div></li>
<li>Enter any twitter API URL you want to call such as below<br />
<pre class="crayon-plain-tag">https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=zappysys&amp;count=4</pre>
</li>
<li>Now check use credentials option</li>
<li>Select new ZS-OAuth connection from dropdown</li>
<li>When new connection dialogbox pops up select Twitter from providers dropdown. Select Default App option for now.</li>
<li>Click Generate Token. It may ask you to login using your Twitter account credentials. If prompted click Approve.</li>
<li>If twitter OAuth grant approved then you will see Access Token and Access Token Secret both populated</li>
<li>Click Test Connection and if it works then click OK to close connection</li>
<li>On JSON Source you can now click Preview to see data from Twitter</li>
<li>You can optionally specify Filter expression [Click Select Filter button] to select result from specific JSON Node. For example if you want to select all Hashtags used inside each Tweet then select Filter like <strong>$.entities.hashtags[*]</strong></li>
<li>Click OK to close the UI</li>
<li>Drag ZS Trash Destination from Toolbox (Or you can use OLEDB Destination if you want to load inside SQL Server)</li>
<li>Connect JSON Source to ZS Trash Destination</li>
<li>Execute SSIS package</li>
</ol>
<div id="attachment_652" style="width: 710px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2015/10/fetch-twitter-data-rest-api-call-ssis-oauth-connection.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-652" class="wp-image-652" src="//zappysys.com/blog/wp-content/uploads/2015/10/fetch-twitter-data-rest-api-call-ssis-oauth-connection.png" alt="Call Twitter REST API in SSIS - using OAuth Connection (Default App)" width="700" height="592" srcset="https://zappysys.com/blog/wp-content/uploads/2015/10/fetch-twitter-data-rest-api-call-ssis-oauth-connection.png 867w, https://zappysys.com/blog/wp-content/uploads/2015/10/fetch-twitter-data-rest-api-call-ssis-oauth-connection-300x254.png 300w" sizes="(max-width: 700px) 100vw, 700px" /></a><p id="caption-attachment-652" class="wp-caption-text">Call Twitter REST API in SSIS &#8211; using OAuth Connection (Default App)</p></div>
<h3>Using Custom OAuth App Created by you</h3>
<p>For some reason if you dont want to use Default Twitter App then you can register Custom App. It requires few extra steps listed in next section but it wont take more than few minutes. In Custom App option you have to specify ClientId and Client Secret (in above screenshot). Once you click Generate Token it will prompt you to login using Twitter account and then you can grant permission.</p>
<h3>Register/Create OAuth Application for twitter API Access</h3>
<p>Now lets look at how to register OAuth Application for Twitter API access.</p>
<p>Goto <a href="https://apps.twitter.com/app/new" target="_blank" rel="noopener">https://apps.twitter.com/app/new</a> and create new app by providing necessary information. Don&#8217;t get confused by calling it App, its just way in twitter to create multiple API Access Keys so you can grant different level of access to different users. Once app is created you will be taken to page where your Consumer Key and Secret Key will be listed.</p>
<div id="attachment_103" style="width: 502px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2015/10/create-twitter-app-access-new-consumer-key-secreat-key.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-103" class="size-full wp-image-103" src="//zappysys.com/blog/wp-content/uploads/2015/10/create-twitter-app-access-new-consumer-key-secreat-key.png" alt="Create Twitter Application - REST API Access for Developer" width="492" height="643" srcset="https://zappysys.com/blog/wp-content/uploads/2015/10/create-twitter-app-access-new-consumer-key-secreat-key.png 492w, https://zappysys.com/blog/wp-content/uploads/2015/10/create-twitter-app-access-new-consumer-key-secreat-key-230x300.png 230w" sizes="(max-width: 492px) 100vw, 492px" /></a><p id="caption-attachment-103" class="wp-caption-text">Create Twitter Application &#8211; REST API Access for Developer</p></div>
<h3>Obtaining Consumer Key and Consumer Secret from Twitter</h3>
<p>Once app is created you can go to <b>Keys and Access Tokens</b> tab. Here you will find Consumer Key and Consumer Secret.<br />
Consumer Key can be Public but Consumer Secret must not be shared (think it like a password).</p>
<div id="attachment_102" style="width: 661px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2015/10/twitter-api-consumer-key-and-access-key.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-102" class="size-full wp-image-102" src="//zappysys.com/blog/wp-content/uploads/2015/10/twitter-api-consumer-key-and-access-key.png" alt="Obtain Twitter API Consumer Key and Consumer Secret - REST API Access for Developer" width="651" height="465" srcset="https://zappysys.com/blog/wp-content/uploads/2015/10/twitter-api-consumer-key-and-access-key.png 651w, https://zappysys.com/blog/wp-content/uploads/2015/10/twitter-api-consumer-key-and-access-key-300x214.png 300w" sizes="(max-width: 651px) 100vw, 651px" /></a><p id="caption-attachment-102" class="wp-caption-text">Obtain Twitter API Consumer Key and Consumer Secret &#8211; REST API Access for Developer</p></div>
<h2>Method 2 &#8211; Read Twitter data in SSIS &#8211; Application-only authentication</h2>
<p>For some reason if you don&#8217;t want to use Twitter user account to access data (e.g. Giving access to consultant so he can access you company Twitter Account via API). In this scenario you have to use Application Only method. In this method you don&#8217;t authorize application using Login form.</p>
<p>Here is our basic flow to access twitter data.</p>
<ol>
<li>Get Bearer Access Token by calling https://api.twitter.com/oauth2/token service (Use POST method and Pass BASE64 encoded ConsumerKey and Consumer Secret)</li>
<li>Call any twitter service by passing Bearer AccessToken we retrieved in previous step.<strong>NOTE:</strong> Any access to twitter service is over HTTPS so automatically your tokens passed along request is encrypted before sending over wire unless someone know how to hack SSL 🙂</li>
</ol>
<h3>Application Only Authentication using REST API task &#8211; Get Access Token</h3>
<p>Once we create SSIS Package &#8211; First step to access any twitter data will be get Access Token. As you can see from below screenshot we have called https://api.twitter.com/oauth2/token service URL with POST method. Notice how we have supplied POST data and 2 headers. Authorization header contains BASE64 encoded value of <strong>YourConsumerKey:YourConsumerSecret</strong></p>
<div id="attachment_107" style="width: 841px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2015/10/ssis-twitter-rest-api-call-get-token.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-107" class="size-full wp-image-107" src="//zappysys.com/blog/wp-content/uploads/2015/10/ssis-twitter-rest-api-call-get-token.png" alt="SSIS Twitter REST API Get Token" width="831" height="465" srcset="https://zappysys.com/blog/wp-content/uploads/2015/10/ssis-twitter-rest-api-call-get-token.png 831w, https://zappysys.com/blog/wp-content/uploads/2015/10/ssis-twitter-rest-api-call-get-token-300x168.png 300w" sizes="(max-width: 831px) 100vw, 831px" /></a><p id="caption-attachment-107" class="wp-caption-text">SSIS Twitter REST API Get Token</p></div>
<h3>Fetch data from Twitter using JSON Source &#8211; Deformalize nested JSON</h3>
<p>Once we have Authentication Token we are ready <b>pull twitter data</b> using JSON Source. Check below screenshot how we have supplied Token in Authorization Header. JSON Source can make your JSON look like normal table (It also de-normalize nested JSON into flat dataset. If you want to extract subset of JSON then simply specify JSON Path expression e.g. $.data.users[*]
<div id="attachment_108" style="width: 852px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2015/10/read-twitter-data-in-ssis-json-source-rest-api.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-108" class="size-full wp-image-108" src="//zappysys.com/blog/wp-content/uploads/2015/10/read-twitter-data-in-ssis-json-source-rest-api.png" alt="Read JSON response of Twitter REST API in SSIS" width="842" height="520" srcset="https://zappysys.com/blog/wp-content/uploads/2015/10/read-twitter-data-in-ssis-json-source-rest-api.png 842w, https://zappysys.com/blog/wp-content/uploads/2015/10/read-twitter-data-in-ssis-json-source-rest-api-300x185.png 300w" sizes="(max-width: 842px) 100vw, 842px" /></a><p id="caption-attachment-108" class="wp-caption-text">Read JSON response of Twitter REST API in SSIS</p></div>
<h3>Load Twitter JSON data to SQL Server</h3>
<p>You can easily connect your <a href="//zappysys.com/products/ssis-powerpack/ssis-json-file-source/">SSIS JSON Source</a> to OLEDB Destination if you want to load Twitter Data to some RDBMS such as SQL Server, MySQL.</p>
<h2>Handling paging of large REST API result set with twitter data &#8211; looping/cursoring</h2>
<p>Most of REST API limit total data sent in single response. So if you wish to get all records then you have to loop through multiple results. Twitter provides looping mechanism using Cursor<a href="https://dev.twitter.com/overview/api/cursoring" target="_blank" rel="noopener">Click here to read more</a></p>
<p>In our case <a href="//zappysys.com/products/ssis-powerpack/ssis-json-file-source/">SSIS JSON Source</a> Supports Paging very well so we are covered. To loop through multiple result sets of twitter data simply configure following 3 properties. See below screenshot.</p>
<div id="attachment_100" style="width: 514px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2015/10/loop-through-twitter-rest-api-result-cursor-paging.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-100" class="size-full wp-image-100" src="//zappysys.com/blog/wp-content/uploads/2015/10/loop-through-twitter-rest-api-result-cursor-paging.png" alt="Twitter REST API - Paging Example -Loop through resultset using cursor" width="504" height="440" srcset="https://zappysys.com/blog/wp-content/uploads/2015/10/loop-through-twitter-rest-api-result-cursor-paging.png 504w, https://zappysys.com/blog/wp-content/uploads/2015/10/loop-through-twitter-rest-api-result-cursor-paging-300x262.png 300w" sizes="(max-width: 504px) 100vw, 504px" /></a><p id="caption-attachment-100" class="wp-caption-text">Twitter REST API &#8211; Paging Example -Loop through resultset using cursor</p></div>
<h2>Word of caution about too many requests</h2>
<p>Twitter does not allow you request too much data too quickly so be careful how many requests you make :). Check their official page on twitter Rate Limit for REST API. You can add delay after each request if you doing pagination. Go to <strong>Throttling tab</strong> of JSON/XML Source. You can change setting there based on API restriction. For example if API allows only 30 requests per minute then adding 2 seconds delay will make sure you wont exceed 30 requests in 1 minute.</p>
<p>To learn more about <a href="https://dev.twitter.com/rest/public/rate-limits" target="_blank" rel="noopener">rate limit of Twitter API check this table</a></p>
<h2>Handling Twitter API Date Format (Parse Twitter Date/Time)</h2>
<p>Twitter returns date in the following format e.g. Fri May 03 15:22:09 +0000 2013 to parse this to correct date/time datatype you can use Date/Time Handling Tab of JSON/XML Source.</p>
<p>Change Custom Date Format as below and preview Twitter data.</p>
<div id="attachment_693" style="width: 821px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2015/10/parse-twitter-date-time-format.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-693" class="size-full wp-image-693" src="//zappysys.com/blog/wp-content/uploads/2015/10/parse-twitter-date-time-format.png" alt="Parsing Twitter API date/time format" width="811" height="249" srcset="https://zappysys.com/blog/wp-content/uploads/2015/10/parse-twitter-date-time-format.png 811w, https://zappysys.com/blog/wp-content/uploads/2015/10/parse-twitter-date-time-format-300x92.png 300w" sizes="(max-width: 811px) 100vw, 811px" /></a><p id="caption-attachment-693" class="wp-caption-text">Parsing Twitter API date/time format</p></div>
<h2>Download related files</h2>
<p>Below is sample SSIS package<br />
<a href="//zappysys.com/blog/wp-content/uploads/2015/11/TwitterFetchDemo_2012.zip">Twitter Demo SSIS 2012</a></p>
<h2>Conclusion</h2>
<p>So you have now seen how easy it is to access twitter data with OAuth 2.0 using <a href="//zappysys.com/products/ssis-powerpack/ssis-json-file-source/">SSIS JSON Source</a> and <a href="//zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/">SSIS REST API Web Service Task</a>. We have also seen how to loop through large resultset using inbuilt Paging support of JSON Source.</p>
<p>The post <a href="https://zappysys.com/blog/read-twitter-data-in-ssis-using-rest-api-task-json-source-oauth2/">How to read Twitter data in SSIS using REST API Call</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
