Looks like you are experiencing two separate issues.
Initially, the Net::OpenTimeout Error occurs when your Ruby script fails to connect to the HubSpot API within the specified timeout period. To resolve this, try increasing the timeout settings, as the default might be too short, especially if there's a slight network delay.
Next, the Authentication Error indicates invalid authentication credentials. To fix this, ensure your @bearer_token variable contains a valid OAuth 2.0 access token, check that the token hasn't expired and needs refreshing, and verify the Authorization header is in the correct format, Bearer <your_token>.
Hope this helps - Happy to help further!! Thank you very much and have a great one! Warm regards
Humashankar VJ HubSpot Community Champion and enthusiast | Engineering Manager
Looks like you are experiencing two separate issues.
Initially, the Net::OpenTimeout Error occurs when your Ruby script fails to connect to the HubSpot API within the specified timeout period. To resolve this, try increasing the timeout settings, as the default might be too short, especially if there's a slight network delay.
Next, the Authentication Error indicates invalid authentication credentials. To fix this, ensure your @bearer_token variable contains a valid OAuth 2.0 access token, check that the token hasn't expired and needs refreshing, and verify the Authorization header is in the correct format, Bearer <your_token>.
Hope this helps - Happy to help further!! Thank you very much and have a great one! Warm regards
Humashankar VJ HubSpot Community Champion and enthusiast | Engineering Manager
im going to mark this as a solution but placing a timeout period didn't work looks like it was something related to my network, but I'm not pretty sure. but what it matters is that is working