I have a HTTP Node with Predefined Credential type and HubSpot Developer Type connected.
And i don´t know why after XX minutes i receive a response:
( So don´t know where is the problem) any help will be great! thanks in advance
The OAuth token used to make this call expired 26 minute(s) ago.
Hey Juan,
it looks like you tried to post you workflow json but you only pasted the text somehow. Can you post your workflow json here and put it inside ``` like this
```{“status”:“rejected”,“reason”:{“context”:{},“name”:“NodeApiError”,“cause”:{“message”:“401 - {"status":"error","message":"The OAuth token used to make this call expired 27 minute(s) ago.","correlationId":"a464a630-58e2-4f69-a5b3-90c252b44d3f","category":"EXPIRED_AUTHENTICATION","context":{"expire time":["2022-09-29T19:16:03.420Z"]}}”,“name”:“Error”,“stack”:“Error: Request failed with status code 401\n at createError (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/createError.js:16:15)\n at settle (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/settle.js:17:12)\n at IncomingMessage.handleStreamEnd (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/adapters/http.js:269:11)\n at IncomingMessage.emit (node:events:525:35)\n at IncomingMessage.emit (node:domain:489:12)\n at endReadableNT (node:internal/streams/readable:1358:12)\n at processTicksAndRejections (node:internal/process/task_queues:83:21)”},“timestamp”:1664480584187,“message”:“Authorization failed - please check your credentials”,“node”:{“parameters”:{“authentication”:“predefinedCredentialType”,“nodeCredentialType”:“hubspotDeveloperApi”,“requestMethod”:“POST”,“url”:“=https://api.hubapi.com/crm/v3/objects/deals/search",“allowUnauthorizedCerts”:false,“responseFormat”:“json”,“jsonParameters”:true,“options”:{},“sendBinaryData”:false,“bodyParametersJson”:"={\n "filters": [\n {\n "propertyName": "associations.contact",\n "operator": "EQ",\n "value": "{{$node["Start"].json["vid"]}}"\n }\n ]\n }”,“headerParametersJson”:“”,“queryParametersJson”:“”},“id”:“24fe0896-a562-443e-b55b-0a7265e54c0f”,“name”:“Search deals associated”,“type”:“n8n-nodes-base.httpRequest”,“typeVersion”:2,“position”:[1480,80],“retryOnFail”:true,“notesInFlow”:true,“credentials”:{“hubspotDeveloperApi”:{“id”:“22”,“name”:“Hubspot Developer Account produccion v2”},“hubspotOAuth2Api”:{“id”:“17”,“name”:“HubSpot account 2”}},“notes”:“Activado re-intentar con 1 segundo de espera.”},“httpCode”:“401”,“description”:“The OAuth token used to make this call expired 27 minute(s) ago.”}} ````
Alright that does sound like a bigger problem, The Dev token for hubspot has a life span of 30 minutes so it sounds like the refresh isn’t getting triggered.
@RicardoE105 do you have any thoughts on this one?