Hi ,
I am using simpro's OAuth api (/oauth2/token) to fetch a new refresh token , however, sometimes I get an Invalid grant error.
The invalid grant errors are totally random.
The simpro docs specify that a refresh token is valid for 14 days. So technically I should never get the invalid_grant error within that 14 day period.
Is there a cap on number of requests ?
What could be the reason of the refresh token expiring randomly?
Please advise.
Invalid grant error
Forum rules
- Check the documentation first. Before posting questions, please check the documentation to ensure it doesn't already cover what you need.
- No spam. All automated messages, advertisements, and links to competitor websites will be deleted immediately.
- Post in relevant sub-forums only. Messages posted in the wrong topic area will be removed and placed in the correct sub-forum by moderators.
- Respect other users. No flaming or abusing fellow forum members. Users who continue to post inflammatory, abusive comments will be deleted from the forum after two warnings are issued by moderators.
- Harassment. No threats or harassment of other users will be tolerated. Any instance of threatening or harassing behavior is grounds for deletion from the forums.
- Adult content. No profanity or pornography is allowed. Posts containing adult material will be deleted.
- Bandwidth. All images and signatures must be 500 x 500 pixels or smaller. Posts containing over-sized images and signatures will be removed.
- Illegal content. No re-posting of copyrighted materials or other illegal content is allowed. Any posts containing illegal content or copyrighted materials will be deleted.
Re: Invalid grant error
Hello Rish,
We actually need to update our documentation about refresh token expiry. Refresh token does not expire until it is used to fetch new set of tokens. There are no limits for now on number of requests.
We actually need to update our documentation about refresh token expiry. Refresh token does not expire until it is used to fetch new set of tokens. There are no limits for now on number of requests.
Muqeet
API Developer | simPRO Software Group
API Developer | simPRO Software Group
Re: Invalid grant error
Hey Muqeet,
That means we should never get invalid_ grant error as long as we've not issued a new refresh token , so what could be the reason of getting an invalid_grant response within the valid period? is it because there are too many request within a short time period ? Also it is totally random so I'm not sure what is causing that.
That means we should never get invalid_ grant error as long as we've not issued a new refresh token , so what could be the reason of getting an invalid_grant response within the valid period? is it because there are too many request within a short time period ? Also it is totally random so I'm not sure what is causing that.
Re: Invalid grant error
If your integration is sending multiple request in short span of time, may be check if you are updating the new refresh token replacing it with the old one correctly every time. But then again as long as it stays random for you it wouldn't be easy to debug this.
Muqeet
API Developer | simPRO Software Group
API Developer | simPRO Software Group
DEVELOPER CENTER