<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>call WEB API using Session-Based Authentication</title><link>https://community.appian.com/discussions/f/integrations/19851/call-web-api-using-session-based-authentication</link><description>Hi, 
 In my project Appian forms are embedded into web application, so SSO is configured and working embedding is success. 
 One more requirement is calling Appian forms from same web page, right now using API key authentication which is working fine</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: call WEB API using Session-Based Authentication</title><link>https://community.appian.com/thread/84072?ContentTypeID=1</link><pubDate>Tue, 27 Jul 2021 11:17:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:dd44f962-229f-484f-bc0b-afe5758134d5</guid><dc:creator>Mahesh Bandi</dc:creator><description>&lt;p&gt;It is working now. While using session-based authentication, we need to include the below script tag on the web page then Session ID will be created. If this web application is hosted on the same origin then Appian Web API uses the same session ID(implicitly included in headers) that was created while SSO authentication. In the case of cross-origin, due to security &lt;span&gt;reasons&lt;/span&gt; by default Web browsers don&amp;#39;t pass headers to WEB API, so we need to pass headers explicitly if it is allowed in the web application(but not recommended due to security reasons).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In our case we are not allowed to pass headers explicitly, so we have used API key Authentication on cross-origin and Session-based authentication on the same origin.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&amp;lt;script src=&amp;quot;&lt;a href="https://dev.internal.intient.com/appian/tempo/ui/sail-client/embeddedBootstrap.nocache.js"&gt;&amp;quot;&amp;gt;dev.internal.intient.com/.../embeddedBootstrap.nocache.js&amp;quot;&lt;/a&gt; id=&amp;quot;appianEmbedded&amp;quot; data-signin =&amp;quot;OKTA&amp;quot; data-themeidentifier=&amp;quot;my-project-theme&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: call WEB API using Session-Based Authentication</title><link>https://community.appian.com/thread/84071?ContentTypeID=1</link><pubDate>Tue, 27 Jul 2021 10:46:28 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:218c7c2d-d02f-4d46-a71e-227d13230587</guid><dc:creator>Mahesh Bandi</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;In my project Appian forms need to embed into a web application, so SSO is configured and able to embed Appian forms into web application successfully.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;One more requirement is calling Appian&amp;nbsp;WEB API&amp;nbsp;from the same web page, right now using API key authentication which is working fine, but planning to change this authentication to&amp;nbsp;Session-Based Authentication.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have&amp;nbsp;looked at the Appian doc for this,&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/19.4/Web_API_Authentication.html#session-based-authentication"&gt;https://docs.appian.com/suite/help/19.4/Web_API_Authentication.html#session-based-authentication&lt;/a&gt;, But couldn&amp;#39;t get what parameters need to pass for&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;Session-Based&amp;nbsp;&lt;/span&gt;authentication.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Also looked at the embedded interfaces doc&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/20.3/Embedded_Interfaces.html"&gt;https://docs.appian.com/suite/help/20.3/Embedded_Interfaces.html&lt;/a&gt;&amp;nbsp;and referred the &amp;quot;Integrated jQuery Example&amp;quot; section there I saw invoking&amp;nbsp;&lt;span&gt;servlet plug-in using&amp;nbsp;Session-Based Authentication, same configuration properties I have tried while calling WEB API but didn&amp;#39;t work. I have tried the below properties in request headers while calling Appian WEB API.&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&amp;#39;Content-Type&amp;#39;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;#39;application/json&amp;#39;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;#39;xhrFields&amp;#39;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt;&amp;nbsp;{&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;#39;withCredentials&amp;#39;&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;true&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Could you help on this to call WEB API successfully from a web page using&amp;nbsp;Session-Based Authentication?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Mahesh&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>