APIs & Integrations

JOsorio21
Membre

authentication credentials not found

Hi there, I'm creating this integration from our app to Hubspot.
It works fine on local but once deployed to dev env (AWS env) it fails giving this error:

"Authentication credentials not found. This API supports both API Key and OAuth 2.0 authentication and you can find more details at https://developers.hubspot.com/docs/methods/auth/oauth-overview"


I'm using the `private-app` access_token (using NODE) to instantiate the new Client and doing all the requests within it, even try to set `defaultHeaders` to see if something would change but didn't.
Any ideas why it's happening?
Seding screenshots bellow:

JOsorio21_0-1684515290871.png

Regards

0 Votes
6 Réponses
JGika
Membre

authentication credentials not found

The error message "authentication credentials not found" typically indicates that a system or application is unable to locate the necessary credentials (such as username or password) required for authentication. Authentication is the process of verifying the identity of a user, system, or application. When the specified credentials are not found or are incorrect, the authentication process fails, and this error message is often displayed.

In various contexts, this error can occur, including when trying to access a secured system, log into an account, or authenticate with an API (Application Programming Interface). To resolve this issue, one would need to ensure that the correct and valid credentials are provided, and if necessary, investigate whether there are any issues with the authentication system or configuration.

0 Votes
Anonymous
Non applicable

authentication credentials not found

The error message "authentication credentials not found" typically indicates that a system or application cannot locate the required credentials (such as username or password) needed for authentication. Authentication verifies the identity of a user, system, or application omegel. When the specified credentials are missing or incorrect, the authentication process fails, resulting in this error message.

This error can occur in various scenarios, such as accessing a secured system, logging into an account, or authenticating with an API (Application Programming Interface). To resolve this issue, ensure that accurate and valid credentials are provided. Additionally, check for any issues with the authentication system or configuration that may be causing the problem.

0 Votes
JGonzalez95
Membre

authentication credentials not found

It looks like the error is related to authentication credentials not being found when your app is deployed to the AWS environment. Here are a few things you can check and try:

 

1. **Environment Variables:** Ensure that the environment variables for your HubSpot API credentials, especially the `HUBSPOT_ACCESS_TOKEN`, are correctly set in your AWS environment. Sometimes, there might be differences in environment configurations between local and AWS.

2. **Permissions:** Double-check that the AWS environment has the necessary permissions to access HubSpot. If you are using IAM roles, make sure that the role assumed by your application has the required permissions for making API requests to HubSpot.

3. **Token Generation:** Ensure that the process of generating the `private-app` access token is working as expected in the AWS environment. If it's using a specific endpoint or service to fetch the token, make sure that service is reachable from your AWS environment.

4. **Networking:** Verify that there are no network restrictions in your AWS environment preventing outgoing requests to the HubSpot API endpoint. Check if there are any security groups, network ACLs, or VPC settings that might be causing the issue.

5. **HubSpot App Configuration:** Double-check the configuration of your HubSpot app, especially the settings related to API access. Ensure that your app download is configured to accept requests from the AWS environment.

6. **Token Expiry:** Check if the access token has expired. If the token has a short expiration time, it might be valid on your local environment but expired on AWS. Ensure that you are refreshing the token as needed.

 

Here's an example comment with suggestions:

```javascript
// Make sure environment variables are correctly set in your AWS environment
// Check AWS permissions for accessing HubSpot, IAM roles, and policies
// Verify the token generation process in AWS and ensure it's working correctly
// Check for network restrictions in AWS, security groups, and VPC settings
// Double-check HubSpot app configuration for API access settings
// Ensure the access token hasn't expired; refresh it if needed
```

Remember to adapt these suggestions based on your specific implementation and the details of your AWS and HubSpot configurations.

0 Votes
BJune
Membre

authentication credentials not found

HI Josorio,

Hope so you're having fun these days, I think you're consistently getting "Authentication credentials not found" error. Here are a few possible reasons and solutions for this issue:

Ensure that the API Key or OAuth 2.0 token used for authentication is valid and has the necessary permissions to access the HubSpot API. Double-check the token you are using in your code.

Verify that the correct API Key or OAuth 2.0 token is being used in your AWS environment. Sometimes, different environments may have separate configuration files or environment variables that need to be set correctly.

Confirm that there are no network or firewall restrictions in your AWS environment that could prevent the integration from accessing the HubSpot API. Ensure that the necessary outgoing network traffic is allowed.

Review your code implementation after download to ensure that the authentication credentials are correctly passed to the HubSpot client or library. Verify that the access token is included in the authorization header or provided in the appropriate way based on the library you are using.

Refer to the HubSpot API documentation and the OAuth 2.0 overview mentioned in the error message. Make sure you are following the correct authentication flow and have implemented the necessary steps for authentication in your integration.

Hope so this will help you!

Regards,

Bryce June

0 Votes
MJohn0
Membre

authentication credentials not found

The error "authentication credentials not found" typically indicates that a system or application is unable to locate the necessary credentials (such as a username, password, API key, or token) for proper authentication. This issue may arise if the provided credentials are incorrect, improperly configured, or if there are issues with access permissions. To resolve this, one should verify the accuracy of the credentials , check configuration settings, and ensure proper access permissions are in place.

0 Votes
JOsorio21
Membre

authentication credentials not found

Hi Bryce,

I appreciate you help, but to be honest as I showed in the code example, everything is set as the documentation ask, I'm even using 2 auth methods that shouldn't be required along each other.
The only thing you mentione that could be a thing here is the firewall on AWS - I will check it.

Because apart from that, I've the logic that is failling on dev working locally, and if it was an issue with the logic or the access_token it wouldn't work locally as well.

Thanks tho
Regards