โ02-05-2026 04:01 AM - edited โ02-05-2026 05:14 AM
Hi, when reaching out to an application with the HTTP connector I often get an error for "invalid_token, the access token provided has expired". This seems to happen every time a new token is needed for a call. When repeating the job, the call goes just fine.
First call result:
Second call result:
Does anyone have an idea what the cause could be? Also I never encounter this problem using Postman.
To mee it seems like the token was used too quickly for the target application to be able to validate the token.
In the debug of the HTTP request I see no details of the actual headers/payload/response
What is the best-practice solution I could try?
I have not seen anything like a delay in the HTTP connector settings and it seems to extreme to make a custom connector.
The target application accepts the usual Oauth2 flow, with grant_type: client_credentials.
This results in a bearer token for all following calls.
I look forward to your inspiration, also: please let me know if this is not the right place for this question.
Kind regards,
Vincent
Solved! Go to Solution.
โ02-05-2026 12:05 PM
Hi @vbosma, for the First workaround can you send the response/error of the http action?
How the second workaround, you can create two http invocation if possibile:
โ02-06-2026 12:51 AM
Yes, this is the way for now. Thank you for your reply.
โ02-05-2026 12:05 PM
Hi @vbosma, for the First workaround can you send the response/error of the http action?
How the second workaround, you can create two http invocation if possibile:
โ02-06-2026 12:38 AM - edited โ02-06-2026 12:39 AM
Hi @francbaviello you can see the error of the first call in my very first screenshot. It is a message that does not contain an actual status code that makes Workato give an error.
The status is 200 OK and the body contains the error. This is the reason there is no error from the HTTP action itself.
Like you opted: I made 2 calls now, 1 going for the /token endpoint, and the next using that token so there are no more invalid tokens.
Thank you for your inspiration/your help and thinking with me!
โ02-05-2026 06:25 AM - edited โ02-05-2026 06:26 AM
Hi @vbosma ,
I have the following question:
How often do you run this recipe?
You can also try enabling the โAutomatic retryโ option (recommended) in your recipe.
This will help you to get the latest token in case failed get positive response.
Thanks and Regards,
Shivakumara K A
โ02-05-2026 07:09 AM - edited โ02-05-2026 07:10 AM
Hi @shivakumara ,
Thank you for your quick reply.
This recipe is eventdriven, so not on a schedule.
Like in my response to francbaviello, the status response from the other client is 200 OK, even though the token is invalid.
Therefor I put in the IF statement (see screenshot in same response). So the automatic retry is no option.
If you have any other ideas I would like to hear them.