Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to automate the retrieval of access tokens from the Super Office Online API.
From what I have understood what I need to do is:
Now I haven't done anything similar, but I have managed to do it somewhat with Qlik Sense and creating a web page that gets the access token back using a local hosted webpage on a webservice. Now I want to do it using Qlik Sense and want to understand if that is possible and how?
The syntax for retrieving the access token with super office is:
https://online.superoffice.com/login/common/oauth/authorize?response_type=token &client_id=670734e0-4c5a-11e3-be9e-a171392e81db &redirect_uri=https://example.com/spa/
So the access token is returned at the URL defined after redirect_uri.
Any suggestions or ideas is appreciated.
Best,
Ali
The trick is to first read the access token by making sure that you select also the headers where the access token most likely is returned.
Then you have to get it out of the table by using Peek and a variable.
Lastly you can use variable through $-sign expansion or directly to include the token in subsequent requests either in the the connection string or via the SQL command of the REST connector inside the WITH CONNECTION part of the SQL.
I have a QlikView QVW that was part of a proof-of-concept for doing this against some other API that wasn't SuperOffice. I have attached it.
Any ideas petter-s?
Yes - I did something similar back in August last year. Not with the SuperOffice API but with another product which needed the same approach as a demo. I'll see if I can find the info later.
Ok.
I've managed to return the access token to a localhost site I've made and hosted with xampp which returns the access token, but I can't seem to figure out how to return that type of response directly in Qlik Sense. To get the access token returned in some format in Qlik Sense so that I can keep everything within Qlik.
The trick is to first read the access token by making sure that you select also the headers where the access token most likely is returned.
Then you have to get it out of the table by using Peek and a variable.
Lastly you can use variable through $-sign expansion or directly to include the token in subsequent requests either in the the connection string or via the SQL command of the REST connector inside the WITH CONNECTION part of the SQL.
I have a QlikView QVW that was part of a proof-of-concept for doing this against some other API that wasn't SuperOffice. I have attached it.
Hi,
@bwisealiahmad: Do you have some sample code to get the REST API connector working with SuperOffice?
@petter: The QVW you shared fails to load when I open it with QV Desktop. Maybe a version problem? Could you maybe share a new version or just the script part?
Thanks!