<?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>base64 Archives | ZappySys Blog</title>
	<atom:link href="https://zappysys.com/blog/tag/base64/feed/" rel="self" type="application/rss+xml" />
	<link>https://zappysys.com/blog/tag/base64/</link>
	<description>SSIS / ODBC Drivers / API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more</description>
	<lastBuildDate>Wed, 19 Mar 2025 07:05:07 +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>base64 Archives | ZappySys Blog</title>
	<link>https://zappysys.com/blog/tag/base64/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to convert Varbinary to Base64 in SSIS</title>
		<link>https://zappysys.com/blog/convert-varbinary-base64-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Wed, 30 Jan 2019 00:38:10 +0000</pubDate>
				<category><![CDATA[SSIS Set Variable Transform]]></category>
		<category><![CDATA[SSIS Template Transform]]></category>
		<category><![CDATA[SSIS Trash Destination]]></category>
		<category><![CDATA[base64]]></category>
		<category><![CDATA[ssis]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=6255</guid>

					<description><![CDATA[<p>Introduction In this post we will show you how to convert varbinary to Base64 in SSIS. We will use FREE Tasks provided by ZappySys. Preparing Sample Data First let&#8217;s create a sample table with some Varbinary datatype. Run following command in SSMS to create a sample table with one sample row. [crayon-6a03968740408098073658/] &#160; Method 1 [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/convert-varbinary-base64-ssis/">How to convert Varbinary to Base64 in SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p>In this post we will show you how to convert varbinary to Base64 in SSIS. We will use <a href="https://zappysys.com/free-ssis-transformations-components-tasks/">FREE Tasks</a> provided by ZappySys.</p>
<div class="content_block" id="custom_post_widget-2523"><h2><span id="Prerequisites">Prerequisites</span></h2>
Before we perform the steps listed in this article, you will need to make sure the following prerequisites are met:
<ol style="margin-left: 1.5em;">
 	<li><abbr title="SQL Server Integration Services">SSIS</abbr> designer installed. Sometimes it is referred to as <abbr title="Business Intelligence Development Studio">BIDS</abbr> or <abbr title="SQL Server Data Tools">SSDT</abbr> (<a href="https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt" target="_blank" rel="noopener">download it from the Microsoft site</a>).</li>
 	<li>Basic knowledge of SSIS package development using <em>Microsoft SQL Server Integration Services</em>.</li>
 	<li>Make sure <span style="text-decoration: underline;"><a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a></span> is installed (<a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">download it</a>, if you haven't already).</li>
 	<li>(<em>Optional step</em>)<em>.</em> <a href="https://zappysys.zendesk.com/hc/en-us/articles/360035974593" target="_blank" rel="noopener">Read this article</a>, if you are planning to deploy packages to a server and schedule their execution later.</li>
</ol></div>
<h2>Preparing Sample Data</h2>
<p>First let&#8217;s create a sample table with some Varbinary datatype. Run following command in SSMS to create a sample table with one sample row.</p><pre class="crayon-plain-tag">create table binarydata(
 data varbinary(max)
)
go
insert into binarydata(data )
values(0x5468697320697320612074657374) /*binary of "This is a test"*/</pre><p>
&nbsp;</p>
<h2>Method 1 &#8211; Using Template Transform</h2>
<p>Let&#8217;s use <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-template-transform.htm" target="_blank" rel="noopener">Template Transform</a> to convert Varbinary data to Base64 format. When you use columns with binary data in Template transform it automatically converts to Base64 by default.</p>
<ol>
<li>Go to Data flow</li>
<li>Drag your OLEDB Source and configure it to outputs SQL Data with Varbinary column  (e.g. select data from dbo.binarydata).</li>
<li>Now drag <strong>ZS Template Transform</strong> from SSIS Toolbox</li>
<li>Connect OLEDB Source to Template Transform</li>
<li>Double click Template Transform  to configure. Now you can click <strong>Insert Placeholders</strong> &gt; <strong>Columns</strong> &gt; Select your <strong>Upstream column</strong> name (which has Varbinary data)</li>
<li>You will see Template text as  &lt;%MyVarBinaryColumn%&gt;</li>
<li>Click OK to Save Template Transform</li>
<li>Now connect Template transform to any Destination e.g. OLEDB Destination.  You can <strong>Map TemplateOutput</strong> column to target column. This will contain Base64 representation of Varbinary data. For example purpose we used ZS Trash destination (Check save to file)</li>
</ol>
<p>&nbsp;</p>
<div id="attachment_6256" style="width: 644px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/ssis-convert-varbinary-to-base64.png"><img fetchpriority="high" decoding="async" aria-describedby="caption-attachment-6256" class="size-full wp-image-6256" src="https://zappysys.com/blog/wp-content/uploads/2019/01/ssis-convert-varbinary-to-base64.png" alt="Convert Varbinary to BASE64 using SSIS Template Transform" width="634" height="488" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/ssis-convert-varbinary-to-base64.png 634w, https://zappysys.com/blog/wp-content/uploads/2019/01/ssis-convert-varbinary-to-base64-300x231.png 300w" sizes="(max-width: 634px) 100vw, 634px" /></a><p id="caption-attachment-6256" class="wp-caption-text">Convert Varbinary to BASE64 using SSIS Template Transform</p></div>
<h3>Save Base64 string to Variable</h3>
<p>In previous step we saw how Template Transform can convert binary data (i.e. Varbinary datatype) to BASE64 string. Now let&#8217;s look at how to save this value to Variable using <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-set-variable-transform.htm" target="_blank" rel="noopener">Set Variable Transform</a>.</p>
<div id="attachment_6273" style="width: 673px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/ssis-set-variable-transform-convert-binary-to-base64.png"><img decoding="async" aria-describedby="caption-attachment-6273" class="size-full wp-image-6273" src="https://zappysys.com/blog/wp-content/uploads/2019/01/ssis-set-variable-transform-convert-binary-to-base64.png" alt="Using SSIS Set Variable Transform in Data flow (Capture binary data as base64 example)" width="663" height="625" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/ssis-set-variable-transform-convert-binary-to-base64.png 663w, https://zappysys.com/blog/wp-content/uploads/2019/01/ssis-set-variable-transform-convert-binary-to-base64-300x283.png 300w" sizes="(max-width: 663px) 100vw, 663px" /></a><p id="caption-attachment-6273" class="wp-caption-text">Using SSIS Set Variable Transform in Data flow (Capture binary data as base64 example)</p></div>
<h2>Method 2 &#8211; Using Trash Destination</h2>
<p>Another way to dump Binary data to CSV file is use ZS Trans Destination. See previous screenshot. If you map OLEDB Source directly to Trash destination without Template Transform then you will see something like below.</p><pre class="crayon-plain-tag">data
VGhpcyBpcyBhIHRlc3Q=</pre><p>
&nbsp;</p>
<p>&nbsp;</p>
<p>The post <a href="https://zappysys.com/blog/convert-varbinary-base64-ssis/">How to convert Varbinary to Base64 in SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>SSIS Base64 Encode Decode without Coding</title>
		<link>https://zappysys.com/blog/ssis-base64-encode-decode-without-coding/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Wed, 07 Sep 2016 16:47:38 +0000</pubDate>
				<category><![CDATA[SSIS Logging Task]]></category>
		<category><![CDATA[base64]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[ssis advanced file system task]]></category>
		<category><![CDATA[ssis logging task]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<guid isPermaLink="false">http://zappysys.com/blog/?p=774</guid>

					<description><![CDATA[<p>Introduction In this post you will learn how to use FREE SSIS Logging Task to perform ssis base64 encode decode and save to Variable or File  (i.e. convert Base64 Encoded value to plain text or encode plain text to base64) . You can also use many other format specifiers found here How to invoke Placeholder [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/ssis-base64-encode-decode-without-coding/">SSIS Base64 Encode Decode without Coding</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p>In this post you will learn how to use <a href="https://zappysys.com/products/ssis-powerpack/ssis-logging-task-free/" target="_blank" rel="noopener">FREE SSIS Logging Task</a> to perform ssis base64 encode decode and save to Variable or File  (i.e. convert Base64 Encoded value to plain text or encode plain text to base64) . You can also use many other <a href="//zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-format-specifiers.htm" target="_blank" rel="noopener">format specifiers found here</a></p>
<h2>How to invoke Placeholder Functions</h2>
<p>There are 3 ways you can use placeholder functions in many tasks with Variable Icon next to the property.</p>
<ol>
<li>User Variable Placeholder</li>
<li>Static String Placeholder</li>
<li>Mixed Placeholder (Static String with Variable)</li>
</ol>
<p><strong>Examples: </strong></p>
<pre class="crayon-plain-tag">{{User::var1,FUN_BASE64ENC}} </pre>
<strong>&#8211;OR&#8211;</strong><br />
<pre class="crayon-plain-tag">&lt;&lt;some direct string,FUN_BASE64ENC&gt;&gt;</pre>
<p><strong>&#8211;OR&#8211;</strong></p>
<pre class="crayon-plain-tag">&lt;&lt;{{User::var1}} and {{User::var2}} ,FUN_BASE64ENC&gt;&gt;</pre>
<h2>Encode Plain text to Base64 string (SSIS base64 encode decode)</h2>
<p>Many times you have requirement to convert plain text into Base64 encoded string (This is very common when you have to transfer data over the web &#8211; set query string / http headers / body ). Typically to perform this you may have to write C# Script if you are SSIS developer but below is very simple way to do without writing any code. <a href="https://zappysys.com/blog/how-to-set-base64-encoded-authorization-header-for-http-web-request/" target="_blank" rel="noopener">Here is the most common use case of Base64 encoded string</a></p>
<ol>
<li>Download <a href="https://zappysys.com/free-ssis-transformations-components-tasks/" target="_blank" rel="noopener">FREE Tasks/Components of SSIS PowerPack</a></li>
<li>Create new SSIS Package</li>
<li>Drag ZS Logging Task from Toolbox</li>
<li>Create SSIS variable which holds plain text value (Lets call it varPlainText. Set some initial value which you want to encode)</li>
<li>Configure <u><span style="color: #000080;">SSIS Logging Task</span></u> as below
<div id="attachment_776" style="width: 310px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2016/09/ssis-base64-encode-decode-without-coding.png"><img decoding="async" aria-describedby="caption-attachment-776" class="wp-image-776 size-medium" src="//zappysys.com/blog/wp-content/uploads/2016/09/ssis-base64-encode-decode-without-coding-300x182.png" alt="SSIS Base64 Encode, Decode using SSIS Logging Task (Without coding convert plain text to base 64 string)" width="300" height="182" srcset="https://zappysys.com/blog/wp-content/uploads/2016/09/ssis-base64-encode-decode-without-coding-300x182.png 300w, https://zappysys.com/blog/wp-content/uploads/2016/09/ssis-base64-encode-decode-without-coding.png 1010w" sizes="(max-width: 300px) 100vw, 300px" /></a><p id="caption-attachment-776" class="wp-caption-text">SSIS Base64 Encode, Decode using SSIS Logging Task (Without coding convert plain text to base 64 string)</p></div></li>
<li>Run it and you will see new file created with encoded value. You can also save encoded value to Variable if you change <strong>Logging Mode = Variable</strong> rather than File</li>
</ol>
<h2>Convert Base64 Encoded value to plain text (Decode)</h2>
<p>To convert Base64 encoded string into plaintext you can perform similar steps described in the above section except you need to use BASE64DEC format specifier rather than BASE64ENC</p>
<p><strong>Example:</strong></p><pre class="crayon-plain-tag">&lt;&lt;QUJDREVGMTIzIyM=,FUN_BASE64DEC&gt;&gt;
--OR--
{{User::MySSISVar1,FUN_BASE64DEC}}</pre><p>
&nbsp;</p>
<h2>How to decode Base64 file in SSIS and save to new file</h2>
<p>If you have a file coming as a base64 encoded string and you want to decode it and save it to a new file then it&#8217;s simple too. Basically, you will need <a href="https://zappysys.com/products/ssis-powerpack/ssis-file-system-task-advanced/" target="_blank" rel="noopener">SSIS Advanced File System Task</a>  and <span style="color: #000080;"><u>SSIS Logging Task</u></span> to achieve this (see package below).</p>
<div id="attachment_775" style="width: 310px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2016/09/ssis-decode-base64-file-encode-using-logging-task.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-775" class="wp-image-775 size-medium" src="//zappysys.com/blog/wp-content/uploads/2016/09/ssis-decode-base64-file-encode-using-logging-task-300x158.png" alt="SSIS decode base64 file - Read content convert to plain text and save to new file" width="300" height="158" srcset="https://zappysys.com/blog/wp-content/uploads/2016/09/ssis-decode-base64-file-encode-using-logging-task-300x158.png 300w, https://zappysys.com/blog/wp-content/uploads/2016/09/ssis-decode-base64-file-encode-using-logging-task.png 603w" sizes="(max-width: 300px) 100vw, 300px" /></a><p id="caption-attachment-775" class="wp-caption-text">SSIS decode base64 file &#8211; Read content convert to plain text and save to new file</p></div>
<p>Here are your steps.</p>
<ol>
<li>Use <a href="https://zappysys.com/products/ssis-powerpack/ssis-file-system-task-advanced/" target="_blank" rel="noopener">SSIS Advanced File System Task</a> and use read file content option to save file content into SSIS Variable</li>
<li>Configure Advanced File System as below.
<div id="attachment_777" style="width: 310px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2016/09/ssis-advanced-file-system-task-read-file-content-into-variable.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-777" class="wp-image-777 size-medium" src="//zappysys.com/blog/wp-content/uploads/2016/09/ssis-advanced-file-system-task-read-file-content-into-variable-300x174.png" alt="Read file content into SSIS variable using SSIS Advanced File System task" width="300" height="174" srcset="https://zappysys.com/blog/wp-content/uploads/2016/09/ssis-advanced-file-system-task-read-file-content-into-variable-300x174.png 300w, https://zappysys.com/blog/wp-content/uploads/2016/09/ssis-advanced-file-system-task-read-file-content-into-variable.png 727w" sizes="(max-width: 300px) 100vw, 300px" /></a><p id="caption-attachment-777" class="wp-caption-text">Read file content into SSIS variable using SSIS Advanced File System task</p></div></li>
<li>Next step connect <u><span style="color: #000080;">SSIS Logging Task</span></u></li>
<li>Configure SSIS Logging Task as per below screenshot.
<div id="attachment_778" style="width: 310px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2016/09/ssis-decode-base64-encoded-file-content.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-778" class="wp-image-778 size-medium" src="//zappysys.com/blog/wp-content/uploads/2016/09/ssis-decode-base64-encoded-file-content-300x260.png" alt="Decode base64 file content in SSIS - Use Logging Task" width="300" height="260" srcset="https://zappysys.com/blog/wp-content/uploads/2016/09/ssis-decode-base64-encoded-file-content-300x260.png 300w, https://zappysys.com/blog/wp-content/uploads/2016/09/ssis-decode-base64-encoded-file-content.png 568w" sizes="(max-width: 300px) 100vw, 300px" /></a><p id="caption-attachment-778" class="wp-caption-text">Decode base64 file content in SSIS &#8211; Use Logging Task</p></div></li>
</ol>
<h2>Convert Base64 Encoded string of local file content (Binary or Text)</h2>
<p>Using FUN_FILE_BASE64ENC we can encode the image or any other local file(Binary or Text) to the Base64 string.</p>
<h3>FUN_FILE_BASE64ENC</h3>
<p><strong>Syntax:</strong></p><pre class="crayon-plain-tag">&lt;&lt;file_path,FUN_FILE_BASE64ENC&gt;&gt;</pre><p>
Returns BASE64 encoded string of local file content (binary or text).</p>
<h4>Parameters:</h4>
<table style="width: 100%;">
<thead>
<tr>
<th style="width: 30%;">Name</th>
<th style="width: 70px;">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>file_path</td>
<td>[String] File path for which you like encode content as Base64.</td>
</tr>
</tbody>
</table>
<h4>Examples:</h4>
<pre class="crayon-plain-tag">&lt;&lt;c:\someimage.png,FUN_FILE_BASE64ENC&gt;&gt;
--OR--
{{User::MySSISVar1,FUN_FILE_BASE64ENC}}</pre>
<h4>Sample Output:</h4>
<p>This returns base64 encoded string of binary file (png)<br />
<pre class="crayon-plain-tag">bXl1c2V..........Ac3NXb3Jk</pre>
<p>The post <a href="https://zappysys.com/blog/ssis-base64-encode-decode-without-coding/">SSIS Base64 Encode Decode without Coding</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Calling REST API in SSIS with Basic Authentication / Userid-Password (BASE64 Authorization header)</title>
		<link>https://zappysys.com/blog/how-to-set-base64-encoded-authorization-header-for-http-web-request/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Thu, 27 Aug 2015 20:58:17 +0000</pubDate>
				<category><![CDATA[SSIS Components]]></category>
		<category><![CDATA[SSIS JSON Source (File/REST)]]></category>
		<category><![CDATA[base64]]></category>
		<category><![CDATA[fiddler]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[rest api]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[ssis http connection]]></category>
		<category><![CDATA[ssis json source]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[ssis rest api task]]></category>
		<category><![CDATA[ssis xml source]]></category>
		<guid isPermaLink="false">http://zappysys.com/blog/?p=34</guid>

					<description><![CDATA[<p>Introduction In this blog post you will explain how to pass basic credentials (i.e. UserID/Password) along with your web request. You will also learn about setting up Authorization Header for HTTP Web Request in Base64 manually. To learn more about how to consume / call REST API in SSIS check this article. HTTP Authorization Header [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/how-to-set-base64-encoded-authorization-header-for-http-web-request/">Calling REST API in SSIS with Basic Authentication / Userid-Password (BASE64 Authorization header)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p>In this blog post you will explain how to pass basic credentials (i.e. UserID/Password) along with your web request. You will also learn about setting up Authorization Header for HTTP Web Request in Base64 manually. To learn more about <a href="//zappysys.com/blog/call-rest-api-using-ssis-web-service-task/" target="_blank" rel="noopener">how to consume / call REST API in SSIS check this article</a>.</p>
<h2>HTTP Authorization Header basics</h2>
<p>As per HTTP Standard you can pass credentials very simple way using basic Authorization header. Below is the sample of Basic Authorization header.</p>
<p>As you can see it consist of HeaderName=Authorization and Value=some <em>base64 encoded string</em><br />
<code>Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==</code><br />
As per standard Base64 encoded string is made up with two elements. <em>your_userid:your_password</em></p>
<blockquote><p><strong>NOTE:</strong> Base64 is encoding and not encryption method. So never hand over your encoded Authorization header string to anyone. Anyone can decode Base64 encoded string easily by using tools <a href="http://www.bing.com/search?q=base64+encode&amp;src=IE-TopResult&amp;FORM=IE11TR&amp;conversationid=" target="_blank" rel="noopener">like this</a></p></blockquote>
<h2>Passing Basic Credentials along with HTTP Web Request</h2>
<p>You can pass credentials (i.e. UserID/Password) in two different ways.</p>
<ol>
<li>Automatic approach &#8211; Using <a href="//zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-http-connection-manager.htm" target="_blank" rel="noopener">ZS-HTTP Connection Manager</a> (BASE64 Encoded Header automatically generated)</li>
<li>Manual approach &#8211; Supplying Authorization where UserID/Password encoded as Base64</li>
</ol>
<h3>Automatic approach &#8211; Using ZS-HTTP Connection Manager</h3>
<p>Now lets look at how to use automatic approach to pass Basic Authorization in following 3 different tasks/components</p>
<ol>
<li>Passing basic credentials in <a href="//zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener">SSIS REST API Task</a></li>
<li>Passing basic credentials in <a href="//zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">SSIS JSON Source</a></li>
<li>Passing basic credentials in <a href="//zappysys.com/products/ssis-powerpack/ssis-xml-source/" target="_blank" rel="noopener">SSIS XML Source</a></li>
</ol>
<h4>Using SSIS REST API Task (Pass Basic credentials using Connection Manager)</h4>
<p>The simplest way to pass credentials is use HTTP Connection Manager. If you are using <a href="//zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener">REST API Task</a> then you can use <strong>Url from Connection</strong> Access Mode. And on connection manager specify UserId and password to pass Basic <strong>Authorization Header </strong></p>
<p>Advantages of this method are..<br />
1) Its very simple<br />
2) Credentials are encrypted in SSIS Package</p>
<blockquote><p><strong>NOTE:</strong> We recommend using <strong>https</strong>:// Urls whenever possible otherwise your web request can be decoded in plain text by any servers sitting between you and target and possibly they can get your password by decoding base64 header.</p></blockquote>
<div><img decoding="async" class="figureimage" title="SSIS REST API Task - Pass Base64 Encoded HTTP Authorization Header" src="https://zappysys.com/blog/wp-content/uploads/2015/08/how-to-set-base64-encoded-authorization-header-for-http-web-request-1.png" alt="SSIS REST API Task - Pass Base64 Encoded HTTP Authorization Header" /></div>
<div></div>
<div><strong>Analyze Base64 Encoded HTTP Authorization Header generated by HTTP Connection Manager</strong></div>
<div>You can analyze Webrequest in some 3rd party Free Debugging tools such as Fiddler (<a href="https://zappysys.com/blog/how-to-use-fiddler-to-analyze-http-web-requests/" target="_blank" rel="noopener">Check this article</a>). As you see how its sending Authorization header in Base64 encoded string.</div>
<div></div>
<div><img decoding="async" class="figureimage" title="Base64 Encoded HTTP Basic Authorization Header View in Fiddler" src="https://zappysys.com/blog/wp-content/uploads/2015/08/how-to-set-base64-encoded-authorization-header-for-http-web-request-2.png" alt="Base64 Encoded HTTP Basic Authorization Header View in Fiddler" /><br />
Base64 Encoded HTTP Basic Authorization Header &#8211; View in Fiddler</div>
<h4>Using SSIS JSON/XML Source  (Pass Basic credentials using Connection Manager)</h4>
<p>You can use HTTP Connection manager in <a href="//zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">JSON Source</a> and <a href="//zappysys.com/products/ssis-powerpack/ssis-xml-source/" target="_blank" rel="noopener">XML Source</a> too. Only difference is you have to check Use Credentials checkbox and select HTTP connection manager from available connection managers dropdown.</p>
<ol>
<li>Select AccessMode as &#8220;File Path or Web URL&#8221;</li>
<li>Enter API URL</li>
<li>Check &#8220;Use Credentials&#8221; option</li>
<li>Click &#8220;New&#8221; next to Connection dropdown or select New &#8220;ZS-HTTP&#8221; connection from dropdown</li>
<li>Configure HTTP Connection as below (i.e. Enter URL, Select Basic Auth, Enter UserID, Password)</li>
<li>Clock OK on HTTP connection manager UI to save and now Test JSON or XML Source UI by clicking Preview (Assuming no other configuration needed)</li>
</ol>
<div id="attachment_1676" style="width: 972px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2015/08/ssis-json-source-rest-api-http-basic-authentication-pass-userid-password.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1676" class="size-full wp-image-1676" src="https://zappysys.com/blog/wp-content/uploads/2015/08/how-to-set-base64-encoded-authorization-header-for-http-web-request-3.png" alt="SSIS JSON Source - Passing Basic Credentials (Supply UserID / Password) using HTTP Connection" width="962" height="757" /></a><p id="caption-attachment-1676" class="wp-caption-text">SSIS JSON Source &#8211; Passing Basic Credentials (Supply UserID / Password) using HTTP Connection</p></div>
<h3>Manual approach &#8211; Supplying Authorization where UserID/Password encoded as Base64</h3>
<p>Our <a href="//zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">JSON Source</a>, <a href="//zappysys.com/products/ssis-powerpack/ssis-xml-source/" target="_blank" rel="noopener">XML Source</a> and <a href="//zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener">REST API Task </a> they all support passing BASE64 Encoded String for Authorization header (see below screenshot). Setting up userid and password in HTTP Connection Manger would do same trick as setting up it manually.</p>
<p>To encode any Header value in BASE64 format you simply have to add BASE64ENC format specifier after variable name.</p>
<p>Example: {{User::varUserAndPassword<strong>,BASE64ENC</strong>}}</p>
<p>&nbsp;</p>
<div><img decoding="async" class="figureimage" title="SSIS JSON Source Task - Pass Base64 Encoded HTTP Authorization Header" src="https://zappysys.com/blog/wp-content/uploads/2015/08/how-to-set-base64-encoded-authorization-header-for-http-web-request-4.png" alt="SSIS JSON Source Task - Pass Base64 Encoded HTTP Authorization Header" /><br />
SSIS JSON Source Task &#8211; Pass Base64 Encoded HTTP Authorization Header</div>
<div><img decoding="async" class="figureimage" title="Base64 Encoded HTTP Basic Authorization Header View in Fiddler" src="https://zappysys.com/blog/wp-content/uploads/2015/08/how-to-set-base64-encoded-authorization-header-for-http-web-request-5.png" alt="Base64 Encoded HTTP Basic Authorization Header View in Fiddler" /></div>
<h2>Reference</h2>
<p>Wikipedia Article &#8211; <a href="https://en.wikipedia.org/wiki/Basic_access_authentication" target="_blank" rel="noopener">HTTP Basic Authorization Header</a></p>
<h2>Download FREE SSIS Components</h2>
<p><a href="https://zappysys.com/products/ssis-powerpack/"><img decoding="async" src="//zappysys.com/wp-content/uploads/2016/10/slider-ssis-powerpack-1.png" /></a></p>
<p>The post <a href="https://zappysys.com/blog/how-to-set-base64-encoded-authorization-header-for-http-web-request/">Calling REST API in SSIS with Basic Authentication / Userid-Password (BASE64 Authorization header)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
