Tero
October 23, 2024, 12:13pm
1
Hi,
We’ve been building workflows in n8n for our company and encountered a recurring issue with OAuth2 token refresh. The issue arises when using HTTP tools for AI agents. Although n8n should refresh the token automatically once it expires, we found that after 24 hours, the HTTP tools stop working due to missing credentials. Video and workflow below are examples of a call to HighLevel oAuth2 API.
Interestingly, running a single HTTP request node calling the API seems to refresh the token and restores functionality for all HTTP tools for 24 hours. It took us quite a while to troubleshoot and pinpoint this behavior. Me or Perplexity couldn’t find this being a known issue.
Video of the issue
HTTP tool oAuth2 not refreshing token.mp4
What is the error message (if any)?
There was an error: “Node does not have credential type”
Please share your workflow
Information on your n8n setup
n8n version: 1.56.2
Database (default: SQLite): default
n8n EXECUTIONS_PROCESS setting (default: own, main): default
Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud
Operating system: Window 11
1 Like
ria
October 28, 2024, 8:41am
2
Hi @Tero
Thanks for reporting this! This should be fixed with version 1.65.0
n8n-io:master
← n8n-io:ai-407-http-tool-returning-response-undefined
opened 10:25AM - 22 Oct 24 UTC
## Summary
This PR fixes an undefined response from HTTP Tool node in case au… thentication is enabled.
Since this PR was merged (https://github.com/n8n-io/n8n/pull/11219) HTTP tool node requires a full response. But the underlying implementation for the request may differ, depending on authentication setting, and so the name of the option to get the full response.
HTTP Tool Node now uses `helpers.httpRequestWithAuthentication` instead of deprecated `helpers.requestWithAuthentication`, so now it should respect the `returnFullResponse` option.
## Related Linear tickets, Github issues, and Community forum posts
- https://github.com/n8n-io/n8n/pull/11219
- https://linear.app/n8n/issue/AI-407/http-tool-returning-response-undefined
- https://community.n8n.io/t/http-tool-request-error/58998
## Review / Merge checklist
- [ ] PR title and summary are descriptive. ([conventions](../blob/master/.github/pull_request_title_conventions.md)) <!--
**Remember, the title automatically goes into the changelog.
Use `(no-changelog)` otherwise.**
-->
- [ ] [Docs updated](https://github.com/n8n-io/n8n-docs) or follow-up ticket created.
- [ ] Tests included. <!--
A bug is not considered fixed, unless a test is added to prevent it from happening again.
A feature is not complete without tests.
-->
- [ ] PR Labeled with `release/backport` (if the PR is an urgent fix that needs to be backported)
Please let us know if you still encounter errors after updating.
Thanks!
2 Likes
system
Closed
November 4, 2024, 8:41am
3
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.