My Products
Help
RMaarssen
CONTRIBUTOR *

refresh oauth token

by RMaarssen (Updated ‎21-09-2020 08:12 by Magnus Johnsen VISMA )

After receiving an token using:

https://community.visma.com/t5/Knowledge-base-in-Developers/OAuth-2-0-Authorization-Flow/ta-p/270859

 

i.e.

https://integration.visma.net/API/resources/oauth/authorize?client_id=xxxxxx&redirect_uri=https%3A%2...

 

and then

 

code=a6d426fd-9bd6-4af8-bf33-6b6751a46c89&client_id=xxxxx&client_secret=yyyyyy

&redirect_uri=https://Vismanet.xxxxx.nl&scope=financialstasks&grant_type=authorization_code

 

{"token":"xxxxxxxxxxxxxxxxxxxxx","token_type":"bearer","scope":"financialstasks"}

 

somewhere along testing (after 1 hour i guess) it becomes invalid.

How can we refresh the token ?

 

Thanks.

7 REPLIES 7

by Magnus Johnsen

HI,

 

Please don't share your tokens.

The Visma.Net FInancials API's do not use refresh tokens as they do not expire unless you have requested a new one.

If you have several people using the same user account/client ID combination, you should be sharing the same token.

What error message are you receiving?

kashyap
PARTNER

by kashyap

I have an account with multiple companies exists. Is refresh token same for all companies? 

by Magnus Johnsen

The token you get from the token endpoint is based on your API client ID & Secret + user.

The user is then connected to companies, which would all use the same token.

 

RMaarssen
CONTRIBUTOR *

by RMaarssen

Hi,

 

I was testing with the development of our software.

I am requesting at 2 locations, our software and Postman.

So as i guess, only one of them will keep on working ?

 

Accepted solution
Magnus Johnsen
VISMA

by Magnus Johnsen

Hi,

Indeed, if you request a token again, the last one will get invalidated.

If you save it when you request it, you can use the same token in both places. 

RMaarssen
CONTRIBUTOR *

by RMaarssen

Hi,

 

Well the problem is that we have desktop software, and we want to show our software at different locations.

So i need to build in the token at one location.

The token is connected to "client_id" + "useraccount logged in with at validation" i guess ?

Yıldırım
VISMA

by Yıldırım (Updated ‎21-09-2020 09:49 by Yıldırım VISMA )

Hello, 


@RMaarssen wrote:

The token is connected to "client_id" + "useraccount logged in with at validation" i guess ?


That's true.

For more information, please review the following article regarding Client & Token mechanism.
Background Information on API Client & Token & Visma.net Financials User & Company