<?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>topic Rest API connection and OAuth 2.0 error in Data Movement &amp; Streaming</title>
    <link>https://community.qlik.com/t5/Data-Movement-Streaming/Rest-API-connection-and-OAuth-2-0-error/m-p/2146198#M1638</link>
    <description>&lt;P&gt;Hi everyone&lt;/P&gt;
&lt;P&gt;I am very new to APIs and I am trying to load data from my financial sytem to Qlik Cloud via an API.&lt;/P&gt;
&lt;P&gt;I have followed all the steps on the systems developer portal, and I have made it work in Postman - so I am doing something right.&lt;BR /&gt;However, I can't seem to get it to connect in Qlik Cloud. I am following the attached guide, as this apparently is the way to handle refresh tokens in Qlik. So it is a two step process with first fetching the refresh token and then fetching the data - both using the REST connector.&lt;/P&gt;
&lt;P&gt;I have attached the pictures of my configuration here. The response when I test connection is just: "HTTP protocol error 400 (Bad Request): {"error":"invalid_request"}"&lt;/P&gt;
&lt;P&gt;Just some information that might help:&lt;BR /&gt;I don't really understand the "grant_type = client_credentials". Is that just standard? It doesn't mention this anywhere on the api documentation page. The only thing I can find there is this guide:&lt;/P&gt;
&lt;P&gt;---&lt;BR /&gt;We exchange the code for a token, that we can use to interact with the API. This happens through a regular old POST request to &lt;A href="https://connect.visma.com/connect/token" target="_blank"&gt;https://connect.visma.com/connect/token&lt;/A&gt;. Here we send:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;grant_type of authorization_code&lt;/LI&gt;
&lt;LI&gt;our redirect_uri from our visma connect application settings&lt;/LI&gt;
&lt;LI&gt;the code we got in step 3&lt;/LI&gt;
&lt;LI&gt;client_id&lt;/LI&gt;
&lt;LI&gt;client_secret&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;(Btw: this is the API documentation, if that helps in any way:&amp;nbsp;&lt;A href="https://developer.dinero.dk/documentation/tutorial/" target="_blank"&gt;https://developer.dinero.dk/documentation/tutorial/&lt;/A&gt;)&lt;/P&gt;
&lt;P&gt;---&lt;/P&gt;
&lt;P&gt;So maybe grant_type is "authorization_code"? I tried that too - but it doesn't work either.&lt;BR /&gt;They also mention a "code" in the documentation that they exchange for a token. I don't seen to be able to find a "code" anywhere in Postman or elsewhere.&lt;/P&gt;
&lt;P&gt;Other than that I have these other variables in postman:&lt;/P&gt;
&lt;P&gt;base_url&lt;BR /&gt;client_id&lt;BR /&gt;client_secret&lt;BR /&gt;auth_url&lt;BR /&gt;access_token_url&lt;BR /&gt;scopes&lt;BR /&gt;organizationld&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe I need to include som of these in the refresh token request as well? I am not sure at all though.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope someone can help.&lt;BR /&gt;Thanks in advance!&lt;/P&gt;</description>
    <pubDate>Wed, 19 Mar 2025 22:43:16 GMT</pubDate>
    <dc:creator>peter_nbc</dc:creator>
    <dc:date>2025-03-19T22:43:16Z</dc:date>
    <item>
      <title>Rest API connection and OAuth 2.0 error</title>
      <link>https://community.qlik.com/t5/Data-Movement-Streaming/Rest-API-connection-and-OAuth-2-0-error/m-p/2146198#M1638</link>
      <description>&lt;P&gt;Hi everyone&lt;/P&gt;
&lt;P&gt;I am very new to APIs and I am trying to load data from my financial sytem to Qlik Cloud via an API.&lt;/P&gt;
&lt;P&gt;I have followed all the steps on the systems developer portal, and I have made it work in Postman - so I am doing something right.&lt;BR /&gt;However, I can't seem to get it to connect in Qlik Cloud. I am following the attached guide, as this apparently is the way to handle refresh tokens in Qlik. So it is a two step process with first fetching the refresh token and then fetching the data - both using the REST connector.&lt;/P&gt;
&lt;P&gt;I have attached the pictures of my configuration here. The response when I test connection is just: "HTTP protocol error 400 (Bad Request): {"error":"invalid_request"}"&lt;/P&gt;
&lt;P&gt;Just some information that might help:&lt;BR /&gt;I don't really understand the "grant_type = client_credentials". Is that just standard? It doesn't mention this anywhere on the api documentation page. The only thing I can find there is this guide:&lt;/P&gt;
&lt;P&gt;---&lt;BR /&gt;We exchange the code for a token, that we can use to interact with the API. This happens through a regular old POST request to &lt;A href="https://connect.visma.com/connect/token" target="_blank"&gt;https://connect.visma.com/connect/token&lt;/A&gt;. Here we send:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;grant_type of authorization_code&lt;/LI&gt;
&lt;LI&gt;our redirect_uri from our visma connect application settings&lt;/LI&gt;
&lt;LI&gt;the code we got in step 3&lt;/LI&gt;
&lt;LI&gt;client_id&lt;/LI&gt;
&lt;LI&gt;client_secret&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;(Btw: this is the API documentation, if that helps in any way:&amp;nbsp;&lt;A href="https://developer.dinero.dk/documentation/tutorial/" target="_blank"&gt;https://developer.dinero.dk/documentation/tutorial/&lt;/A&gt;)&lt;/P&gt;
&lt;P&gt;---&lt;/P&gt;
&lt;P&gt;So maybe grant_type is "authorization_code"? I tried that too - but it doesn't work either.&lt;BR /&gt;They also mention a "code" in the documentation that they exchange for a token. I don't seen to be able to find a "code" anywhere in Postman or elsewhere.&lt;/P&gt;
&lt;P&gt;Other than that I have these other variables in postman:&lt;/P&gt;
&lt;P&gt;base_url&lt;BR /&gt;client_id&lt;BR /&gt;client_secret&lt;BR /&gt;auth_url&lt;BR /&gt;access_token_url&lt;BR /&gt;scopes&lt;BR /&gt;organizationld&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe I need to include som of these in the refresh token request as well? I am not sure at all though.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope someone can help.&lt;BR /&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Wed, 19 Mar 2025 22:43:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Data-Movement-Streaming/Rest-API-connection-and-OAuth-2-0-error/m-p/2146198#M1638</guid>
      <dc:creator>peter_nbc</dc:creator>
      <dc:date>2025-03-19T22:43:16Z</dc:date>
    </item>
  </channel>
</rss>

