cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

refresh oauth token

SOLVED

Re: refresh oauth token

So then there is a issue. We are getting "invalid_grant" when we try to run process for multiple companies at same time. 

FYI: Out of 18 companies 10 companies use the same branch of visma and other 5 & 3 uses different branch of visma.



Anonymous
Not applicable

refresh oauth token

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.

Re: refresh oauth token

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?

Re: refresh oauth token

Hi Magnus,

Do this apply to new connect feature as well?  I have one user which have 18 companies in my system. All are connected using new connect auth feature. Currently getting "invalid_grant" on different companies on different time. Sometimes work and sometimes not work.   How can I make all 18 work at same time?

Re: refresh oauth token

Hi, no this doess not apply to connect. 
Please check this post out: https://community.visma.com/t5/Forum-in-Developers-Visma-net/Visma-net-ERP-API-Developer-Portal-Star... 
This explains the main differences. 
You can also find more info in developer portal here: 

OliverOKane_0-1719905208244.png

 

Re: refresh oauth token

So then there is a issue. We are getting "invalid_grant" when we try to run process for multiple companies at same time. 

FYI: Out of 18 companies 10 companies use the same branch of visma and other 5 & 3 uses different branch of visma.



Re: refresh oauth token

Hi,

Since this is a thread with issues from both the old authentication method and the new method over a couple of years, we recommend that you start a new thread with a description of the current issues you are experiencing. You can also reach out to your local support here:
https://community.visma.com/t5/Forum-in-Developers-Visma-net/Update-on-Visma-net-ERP-API-Support-cha...

Kind regards
Sandra

Re: refresh oauth token

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

Re: refresh oauth token

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.

 

Anonymous
Not applicable

Re: refresh oauth token

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 ?

 

Re: refresh oauth token

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. 

Anonymous
Not applicable

Re: refresh oauth token

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 ?

Re: refresh oauth token

Hello, 


@Anonymous 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