Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
peter_nbc
Contributor II
Contributor II

Rest API connection and OAuth 2.0 error

Hi everyone

I am very new to APIs and I am trying to load data from my financial sytem to Qlik Cloud via an API.

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.
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.

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"}"

Just some information that might help:
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:

---
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 https://connect.visma.com/connect/token. Here we send:

  1. grant_type of authorization_code
  2. our redirect_uri from our visma connect application settings
  3. the code we got in step 3
  4. client_id
  5. client_secret

(Btw: this is the API documentation, if that helps in any way: https://developer.dinero.dk/documentation/tutorial/)

---

So maybe grant_type is "authorization_code"? I tried that too - but it doesn't work either.
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.

Other than that I have these other variables in postman:

base_url
client_id
client_secret
auth_url
access_token_url
scopes
organizationld

 

Maybe I need to include som of these in the refresh token request as well? I am not sure at all though.

 

Hope someone can help.
Thanks in advance!

0 Replies