<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>article Connect Qlik Sense Rest API to oAuth2 APIs (e.g. CVENT Core) in Official Support Articles</title>
    <link>https://community.qlik.com/t5/Official-Support-Articles/Connect-Qlik-Sense-Rest-API-to-oAuth2-APIs-e-g-CVENT-Core/ta-p/2472618</link>
    <description>&lt;P&gt;This article documents the use case scenario of using CVENT Core.&lt;/P&gt;
&lt;BLOCKQUOTE class="quote"&gt;This customization is provided as is. Qlik Support cannot provide continued support of the solution. For assistance, reach out to our &lt;A href="https://community.qlik.com/t5/Official-Support-Articles/How-and-when-to-contact-Qlik-s-Professional-Services-and/ta-p/1714936" target="_blank" rel="noopener"&gt;Professional Services&lt;/A&gt; or engage in our active &lt;A href="https://community.qlik.com/t5/Integration-Extension-APIs/bd-p/qlik-sense-integration-extension-api" target="_blank" rel="noopener"&gt;Integrations forum&lt;/A&gt;.&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Qlik has used CVENT Core to organize sessions for Qlik Connect, allowing Qlik to extract data hourly into a Qlik Sense app.&lt;/P&gt;
&lt;P&gt;Cvent Core uses 2-legged oAuth2. Qlik Application Automation's oAuth2 connectors currently only support 3-legged oAuth2, so I had to work around by connecting straight to Qlik Sense REST Connector, where we could do 2-legged. Here's how we did this.&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;Setup&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/H3&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;STRONG&gt;Get your credentials, which you need to make the first token call.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;Make sure you can login to your workspace and create application to get a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;client_id&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;client_secret&lt;/STRONG&gt;. Have these open and ready to copy. Here's a walkthrough if you're having trouble finding them:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developer-portal.cvent.com/docs/rest-api/developer-quickstart" target="_self" rel="nofollow noopener noreferrer"&gt;Developer quickstart&lt;/A&gt;. And send this to your CVENT manager if you can't access:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developer-portal.cvent.com/docs/rest-api/inviting-your-developers" target="_self" rel="nofollow noopener noreferrer"&gt;Inviting your developers&lt;/A&gt;.&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG style="font-family: inherit;"&gt;Create the token refresh connector in Qlik Sense and get your first access token.&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN&gt;Create new connection &amp;gt; REST API. Use the following details:&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;
&lt;UL class="lia-list-style-type-circle"&gt;
&lt;LI&gt;URL:&amp;nbsp;&lt;A href="https://api-platform.cvent.com/ea/oauth2/token" target="_blank" rel="nofollow noopener noreferrer"&gt;https://api-platform.cvent.com/ea/oauth2/token&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;Method: POST (empty body)&lt;/LI&gt;
&lt;LI&gt;Check: Add 'Expect: 100-continue' header&lt;/LI&gt;
&lt;LI&gt;Authentication Schema: Anonymous&lt;/LI&gt;
&lt;LI&gt;Query Parameters:
&lt;UL&gt;
&lt;LI&gt;grant_type: client_credentials&lt;/LI&gt;
&lt;LI&gt;client_id: {your client id}&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;Query headers:
&lt;UL&gt;
&lt;LI&gt;Content-Type:&amp;nbsp;application/x-www-form-urlencoded&lt;/LI&gt;
&lt;LI&gt;Authorization: Basic {your client secret}&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;No need for WITH CONNECTION or Pagination.&lt;/STRONG&gt; Test this connection and save it, with a name like CVENT_TOKENREFRESH. Then click to select data on the connector and click the root table.&lt;BR /&gt;&lt;BR /&gt;This lists &lt;STRONG&gt;your first bearer token&lt;/STRONG&gt;, which will expire in 60 min, but will be valid long enough to set up your session or attendee connectors. If your token expires, simply "select data" again to regenerate another. We don't need this quite yet, so click cancel for now.&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG style="font-family: inherit;"&gt;Add script to regenerate token on app reload to the beginning of your data load script.&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN&gt;&lt;SPAN&gt;Add the following to the beginning of your load script, or just before your CVENT data. This script will use the connector you just made to generate the token and save it as a variable&amp;nbsp;"vAuthToken".&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;PRE&gt;// Get access token using Basic Auth&lt;BR /&gt;LIB CONNECT TO 'QlikWorld:CVENT_TOKENREFRESH';&lt;BR /&gt;TokenRaw:&lt;BR /&gt;SQL SELECT&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;"access_token"&lt;/SPAN&gt;&lt;BR /&gt;FROM JSON (wrap on) "root";&lt;BR /&gt;[Token]:&lt;BR /&gt;LOAD [access_token]&lt;BR /&gt;RESIDENT TokenRaw;&lt;BR /&gt;DROP TABLE TokenRaw;&lt;BR /&gt;&amp;nbsp;let vAuthToken=peek('access_token',-1);&lt;BR /&gt;&amp;nbsp;drop table Token;&lt;BR /&gt;//Trace $(vAuthToken);&lt;/PRE&gt;
&lt;/LI&gt;
&lt;LI&gt;&amp;nbsp;&lt;STRONG style="font-family: inherit;"&gt;Create your CVENT session data connector&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;(or any other connector you need from the&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A style="font-family: inherit; background-color: #ffffff;" href="https://developer-portal.cvent.com/documentation" target="_self" rel="nofollow noopener noreferrer"&gt;APIs, reference here&lt;/A&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG style="font-family: inherit;"&gt;using the original token&lt;/STRONG&gt;&lt;SPAN&gt;. First, click "select data" on your TOKENREFRESH connector to pull up the screenshot above, and click the token to copy it to your clipboard. Then, click Create new connection &amp;gt; REST API and use the following details. For this example I'll create a connector to&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A style="font-family: inherit; background-color: #ffffff;" href="https://developer-portal.cvent.com/documentation#tag/Sessions/operation/listSessions" target="_self" rel="nofollow noopener noreferrer"&gt;List Sessions&lt;/A&gt;&lt;SPAN&gt;. Many details like the url, method, and pagination can be found in the&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A style="font-family: inherit; background-color: #ffffff;" href="https://developer-portal.cvent.com/documentation#tag/Sessions/operation/listSessions" target="_self" rel="nofollow noopener noreferrer"&gt;documentation&lt;/A&gt;&lt;SPAN&gt;.&amp;nbsp;&lt;/SPAN&gt;
&lt;UL class="lia-list-style-type-circle"&gt;
&lt;LI&gt;URL:&amp;nbsp;&lt;A href="https://api-platform.cvent.com/ea/sessions" target="_blank" rel="nofollow noopener noreferrer"&gt;https://api-platform.cvent.com/ea/sessions&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;Method: GET&lt;/LI&gt;
&lt;LI&gt;Query parameters: N/A&lt;/LI&gt;
&lt;LI&gt;Query headers:&amp;nbsp;
&lt;UL&gt;
&lt;LI&gt;Authorization: Bearer {your first token, copied to clipboard}&lt;/LI&gt;
&lt;LI&gt;Accept:&amp;nbsp;application/json&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;CHECK: Allow "WITH CONNECTION"&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;A href="https://community.qlik.com/t5/Connectivity-Data-Prep/REST-Connection-next-token/m-p/2440242#M13538" target="_self"&gt;Pagination&lt;/A&gt;:&amp;nbsp;&lt;/STRONG&gt;
&lt;UL&gt;
&lt;LI&gt;Pagination type: Next token&lt;/LI&gt;
&lt;LI&gt;'Next token' parameter name: token&lt;/LI&gt;
&lt;LI&gt;'Next token' path: root/paging/nextToken&lt;/LI&gt;
&lt;LI&gt;Do NOT check "pass via header" or "look in header"&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Name, test, and save your connector.&lt;/STRONG&gt; Then, select data from the connector and add all your tables.&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG style="font-family: inherit;"&gt;Adjust connector script to utilize new access token instead of original.&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN&gt;Since the session connector was set up with the access token we generated, it will only work for 60 minutes! However, since we checked off "Allow "WITH CONNECTION", we can tell the connector to use a different value for the header / authorization token each time (aka, our vAuthToken variable). Go to your sql script and add the following bolded script, right before the final semicolon (do not add the italic script, that should already be there):&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;
&lt;PRE&gt;&lt;SPAN&gt;FROM JSON (wrap on) "root" PK "__KEY_root"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;STRONG&gt;WITH CONNECTION (&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;STRONG&gt;HTTPHEADER "Authorization" "Bearer $(vAuthToken)"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Load your app and test that this is working as designed. Use this same process of steps 4 and 5 for any other event call you need to make, such as Enrollment, Surveys, and more.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;Limitations&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/H3&gt;
&lt;UL class="lia-list-style-type-circle"&gt;
&lt;LI&gt;If you need to add new fields to the {session} connector, you will need to generate another token by "selecting data" from the token refresh connector, copy it, edit the {session} connector to add the new token, saving it, and selecting data from the {session} connector, and add the fields. This makes it challenging to collaborate. Better to just add every field at the beginning when you do setup and drop what you don't need.&lt;/LI&gt;
&lt;LI&gt;Security issues - if you are using your credentials to generate the token, make sure the connector is in a secure shared space and not somewhere that can be accessed by anyone in your tenant, and mask the variable or do what you need to do there.&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;Writeback: not sure how I will do this since it requires app automation which can't do 2-legged. But I'll update here if we figure it out next year.&amp;nbsp;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;Related Content&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/H3&gt;
&lt;UL class="lia-list-style-type-circle"&gt;
&lt;LI&gt;&lt;A href="https://developer-portal.cvent.com/documentation" target="_self" rel="nofollow noopener noreferrer"&gt;CVENT API Reference&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://help.qlik.com/en-US/connectors/Subsystems/REST_connector_help/Content/Connectors_REST/Create-REST-connection/Pagination-scenarios.htm" target="_self" rel="nofollow noopener noreferrer"&gt;Qlik Sense REST Pagination&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://community.qlik.com/t5/Connectivity-Data-Prep/REST-Connection-next-token/m-p/2440242#M13538" target="_self"&gt;CVENT pagination post&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://developer-portal.cvent.com/docs/rest-api/developer-quickstart" target="_self" rel="nofollow noopener noreferrer"&gt;CVENT Ouath2&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;</description>
    <pubDate>Mon, 12 Aug 2024 07:49:13 GMT</pubDate>
    <dc:creator>Meghann_MacDonald</dc:creator>
    <dc:date>2024-08-12T07:49:13Z</dc:date>
    <item>
      <title>Connect Qlik Sense Rest API to oAuth2 APIs (e.g. CVENT Core)</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/Connect-Qlik-Sense-Rest-API-to-oAuth2-APIs-e-g-CVENT-Core/ta-p/2472618</link>
      <description>&lt;P&gt;This article documents the use case scenario of using CVENT Core.&lt;/P&gt;
&lt;BLOCKQUOTE class="quote"&gt;This customization is provided as is. Qlik Support cannot provide continued support of the solution. For assistance, reach out to our &lt;A href="https://community.qlik.com/t5/Official-Support-Articles/How-and-when-to-contact-Qlik-s-Professional-Services-and/ta-p/1714936" target="_blank" rel="noopener"&gt;Professional Services&lt;/A&gt; or engage in our active &lt;A href="https://community.qlik.com/t5/Integration-Extension-APIs/bd-p/qlik-sense-integration-extension-api" target="_blank" rel="noopener"&gt;Integrations forum&lt;/A&gt;.&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Qlik has used CVENT Core to organize sessions for Qlik Connect, allowing Qlik to extract data hourly into a Qlik Sense app.&lt;/P&gt;
&lt;P&gt;Cvent Core uses 2-legged oAuth2. Qlik Application Automation's oAuth2 connectors currently only support 3-legged oAuth2, so I had to work around by connecting straight to Qlik Sense REST Connector, where we could do 2-legged. Here's how we did this.&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;Setup&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/H3&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;STRONG&gt;Get your credentials, which you need to make the first token call.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;Make sure you can login to your workspace and create application to get a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;client_id&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;client_secret&lt;/STRONG&gt;. Have these open and ready to copy. Here's a walkthrough if you're having trouble finding them:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developer-portal.cvent.com/docs/rest-api/developer-quickstart" target="_self" rel="nofollow noopener noreferrer"&gt;Developer quickstart&lt;/A&gt;. And send this to your CVENT manager if you can't access:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developer-portal.cvent.com/docs/rest-api/inviting-your-developers" target="_self" rel="nofollow noopener noreferrer"&gt;Inviting your developers&lt;/A&gt;.&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG style="font-family: inherit;"&gt;Create the token refresh connector in Qlik Sense and get your first access token.&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN&gt;Create new connection &amp;gt; REST API. Use the following details:&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;
&lt;UL class="lia-list-style-type-circle"&gt;
&lt;LI&gt;URL:&amp;nbsp;&lt;A href="https://api-platform.cvent.com/ea/oauth2/token" target="_blank" rel="nofollow noopener noreferrer"&gt;https://api-platform.cvent.com/ea/oauth2/token&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;Method: POST (empty body)&lt;/LI&gt;
&lt;LI&gt;Check: Add 'Expect: 100-continue' header&lt;/LI&gt;
&lt;LI&gt;Authentication Schema: Anonymous&lt;/LI&gt;
&lt;LI&gt;Query Parameters:
&lt;UL&gt;
&lt;LI&gt;grant_type: client_credentials&lt;/LI&gt;
&lt;LI&gt;client_id: {your client id}&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;Query headers:
&lt;UL&gt;
&lt;LI&gt;Content-Type:&amp;nbsp;application/x-www-form-urlencoded&lt;/LI&gt;
&lt;LI&gt;Authorization: Basic {your client secret}&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;No need for WITH CONNECTION or Pagination.&lt;/STRONG&gt; Test this connection and save it, with a name like CVENT_TOKENREFRESH. Then click to select data on the connector and click the root table.&lt;BR /&gt;&lt;BR /&gt;This lists &lt;STRONG&gt;your first bearer token&lt;/STRONG&gt;, which will expire in 60 min, but will be valid long enough to set up your session or attendee connectors. If your token expires, simply "select data" again to regenerate another. We don't need this quite yet, so click cancel for now.&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG style="font-family: inherit;"&gt;Add script to regenerate token on app reload to the beginning of your data load script.&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN&gt;&lt;SPAN&gt;Add the following to the beginning of your load script, or just before your CVENT data. This script will use the connector you just made to generate the token and save it as a variable&amp;nbsp;"vAuthToken".&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;PRE&gt;// Get access token using Basic Auth&lt;BR /&gt;LIB CONNECT TO 'QlikWorld:CVENT_TOKENREFRESH';&lt;BR /&gt;TokenRaw:&lt;BR /&gt;SQL SELECT&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;"access_token"&lt;/SPAN&gt;&lt;BR /&gt;FROM JSON (wrap on) "root";&lt;BR /&gt;[Token]:&lt;BR /&gt;LOAD [access_token]&lt;BR /&gt;RESIDENT TokenRaw;&lt;BR /&gt;DROP TABLE TokenRaw;&lt;BR /&gt;&amp;nbsp;let vAuthToken=peek('access_token',-1);&lt;BR /&gt;&amp;nbsp;drop table Token;&lt;BR /&gt;//Trace $(vAuthToken);&lt;/PRE&gt;
&lt;/LI&gt;
&lt;LI&gt;&amp;nbsp;&lt;STRONG style="font-family: inherit;"&gt;Create your CVENT session data connector&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;(or any other connector you need from the&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A style="font-family: inherit; background-color: #ffffff;" href="https://developer-portal.cvent.com/documentation" target="_self" rel="nofollow noopener noreferrer"&gt;APIs, reference here&lt;/A&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG style="font-family: inherit;"&gt;using the original token&lt;/STRONG&gt;&lt;SPAN&gt;. First, click "select data" on your TOKENREFRESH connector to pull up the screenshot above, and click the token to copy it to your clipboard. Then, click Create new connection &amp;gt; REST API and use the following details. For this example I'll create a connector to&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A style="font-family: inherit; background-color: #ffffff;" href="https://developer-portal.cvent.com/documentation#tag/Sessions/operation/listSessions" target="_self" rel="nofollow noopener noreferrer"&gt;List Sessions&lt;/A&gt;&lt;SPAN&gt;. Many details like the url, method, and pagination can be found in the&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A style="font-family: inherit; background-color: #ffffff;" href="https://developer-portal.cvent.com/documentation#tag/Sessions/operation/listSessions" target="_self" rel="nofollow noopener noreferrer"&gt;documentation&lt;/A&gt;&lt;SPAN&gt;.&amp;nbsp;&lt;/SPAN&gt;
&lt;UL class="lia-list-style-type-circle"&gt;
&lt;LI&gt;URL:&amp;nbsp;&lt;A href="https://api-platform.cvent.com/ea/sessions" target="_blank" rel="nofollow noopener noreferrer"&gt;https://api-platform.cvent.com/ea/sessions&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;Method: GET&lt;/LI&gt;
&lt;LI&gt;Query parameters: N/A&lt;/LI&gt;
&lt;LI&gt;Query headers:&amp;nbsp;
&lt;UL&gt;
&lt;LI&gt;Authorization: Bearer {your first token, copied to clipboard}&lt;/LI&gt;
&lt;LI&gt;Accept:&amp;nbsp;application/json&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;CHECK: Allow "WITH CONNECTION"&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;A href="https://community.qlik.com/t5/Connectivity-Data-Prep/REST-Connection-next-token/m-p/2440242#M13538" target="_self"&gt;Pagination&lt;/A&gt;:&amp;nbsp;&lt;/STRONG&gt;
&lt;UL&gt;
&lt;LI&gt;Pagination type: Next token&lt;/LI&gt;
&lt;LI&gt;'Next token' parameter name: token&lt;/LI&gt;
&lt;LI&gt;'Next token' path: root/paging/nextToken&lt;/LI&gt;
&lt;LI&gt;Do NOT check "pass via header" or "look in header"&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Name, test, and save your connector.&lt;/STRONG&gt; Then, select data from the connector and add all your tables.&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG style="font-family: inherit;"&gt;Adjust connector script to utilize new access token instead of original.&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN&gt;Since the session connector was set up with the access token we generated, it will only work for 60 minutes! However, since we checked off "Allow "WITH CONNECTION", we can tell the connector to use a different value for the header / authorization token each time (aka, our vAuthToken variable). Go to your sql script and add the following bolded script, right before the final semicolon (do not add the italic script, that should already be there):&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;
&lt;PRE&gt;&lt;SPAN&gt;FROM JSON (wrap on) "root" PK "__KEY_root"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;STRONG&gt;WITH CONNECTION (&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;STRONG&gt;HTTPHEADER "Authorization" "Bearer $(vAuthToken)"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Load your app and test that this is working as designed. Use this same process of steps 4 and 5 for any other event call you need to make, such as Enrollment, Surveys, and more.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;Limitations&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/H3&gt;
&lt;UL class="lia-list-style-type-circle"&gt;
&lt;LI&gt;If you need to add new fields to the {session} connector, you will need to generate another token by "selecting data" from the token refresh connector, copy it, edit the {session} connector to add the new token, saving it, and selecting data from the {session} connector, and add the fields. This makes it challenging to collaborate. Better to just add every field at the beginning when you do setup and drop what you don't need.&lt;/LI&gt;
&lt;LI&gt;Security issues - if you are using your credentials to generate the token, make sure the connector is in a secure shared space and not somewhere that can be accessed by anyone in your tenant, and mask the variable or do what you need to do there.&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;Writeback: not sure how I will do this since it requires app automation which can't do 2-legged. But I'll update here if we figure it out next year.&amp;nbsp;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;Related Content&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/H3&gt;
&lt;UL class="lia-list-style-type-circle"&gt;
&lt;LI&gt;&lt;A href="https://developer-portal.cvent.com/documentation" target="_self" rel="nofollow noopener noreferrer"&gt;CVENT API Reference&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://help.qlik.com/en-US/connectors/Subsystems/REST_connector_help/Content/Connectors_REST/Create-REST-connection/Pagination-scenarios.htm" target="_self" rel="nofollow noopener noreferrer"&gt;Qlik Sense REST Pagination&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://community.qlik.com/t5/Connectivity-Data-Prep/REST-Connection-next-token/m-p/2440242#M13538" target="_self"&gt;CVENT pagination post&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://developer-portal.cvent.com/docs/rest-api/developer-quickstart" target="_self" rel="nofollow noopener noreferrer"&gt;CVENT Ouath2&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Mon, 12 Aug 2024 07:49:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/Connect-Qlik-Sense-Rest-API-to-oAuth2-APIs-e-g-CVENT-Core/ta-p/2472618</guid>
      <dc:creator>Meghann_MacDonald</dc:creator>
      <dc:date>2024-08-12T07:49:13Z</dc:date>
    </item>
  </channel>
</rss>

