Token expiration problem | Community
Skip to main content
February 10, 2022
Solved

Token expiration problem

  • February 10, 2022
  • 1 reply
  • 8046 views

Hello everyone i'm connecting Adobe API's to Outsystems to convert docx to pdf and to work with Adobe Sign, but i'm having issues with the Token.

 

1st (Convert docx to pdf): I got the JWT Token through the Private key and it will last 24h, then i retrieved the Token that will last, according with the documentation, 86399999 seconds or two and a half years more or less. So I'm supposing that i can convert my docx with that Token in the next 2 and a half years, i tested it and worked fine (I sent the file and I received the binary data in pdf). My last test was on Thursday (2022/02/08)  and now i tried to convert a file and it says "token unauthorized" so i had to re-do the process with the JWT Token all over again...

 

2nd (Adobe Sign): I logged in and it redirects to my website with the code, then i got the Token (i don't remember the duration) but then i refreshed the Token and the new one, according with the documentation, expires in 6 months (if no one uses it in that time). I sent the files to sign and retrieved the signed document but then 2 hours later i tried to do the same thing but again it says (Token unauthorized).

 

Can anyone help? I can't put this in production if one day later will stop working. I'm using the free account for now could be it?

 

Thank you

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by tmj

@tiagoncpereira 

 

I see where your confusion lies at.

 

The first question of your relates to using a Service Account (JWT) credential .

  1. You can call the same API (/ims/jwt/exchange) as many times as you need to get a new access token. 
  2. To call the API you would need to re-generate a signed JWT token which can be done programmatically: https://developer.adobe.com/developer-console/docs/guides/authentication/JWT/#using-jwt-libraries-and-creation-tools 

 

The second question relates much more to specific sign API usage and would be best answered on Adobe Sign's team forum: https://developer.adobe.com/developer-console/docs/guides/authentication/JWT/#using-jwt-libraries-and-creation-tools 

 

Hope this helps. Feel free to reach out in case you have more questions. 

If this answered your question, please mark it as accepted for the benefit of the community.

Thanks
Manik

1 reply

tmj
Adobe Employee
Adobe Employee
February 14, 2022

Hi @tiagoncpereira 

 

then i retrieved the Token that will last, according with the documentation, 86399999 seconds or two and a half years more or less

The expires_in value is in milliseconds as opposed to seconds. 

 

I logged in and it redirects to my website with the code, then i got the Token (i don't remember the duration) but then i refreshed the Token and the new one, according with the documentation, expires in 6 months (if no one uses it in that time)

Could you link the documentation here please? 

 

Thanks,
Manik

 

 

 

February 14, 2022

@tmj wrote:

Hi @tiagoncpereira 

 

then i retrieved the Token that will last, according with the documentation, 86399999 seconds or two and a half years more or less

The expires_in value is in milliseconds as opposed to seconds. 

 

My bad.....is there any way to renew it automatically?

 

I logged in and it redirects to my website with the code, then i got the Token (i don't remember the duration) but then i refreshed the Token and the new one, according with the documentation, expires in 6 months (if no one uses it in that time)

Could you link the documentation here please? 

 

My bad again.. it's 60 days Adobe Sign, an Adobe Document Cloud Solution

Bu still it says:  Refresh tokens expire after 60 days of inactivity. In other words, a client can continue to use a refresh token indefinitely, as long as it is being used at least once every 60 days - otherwise it expires automatically

But after 2 hours it says that the token is no longer authorized.