When trying to setup the search console connector ...
# ask-ai
d
When trying to setup the search console connector in Airbyte OSS, I get the response "UnauthorizedServiceAccountError('Unable to connect with provided Service Account credentials. Make sure the
sevice account credentials
provided are valid.') any thoughts what happened here?
k
It looks like you're encountering an issue with the Google Search Console connector in Airbyte OSS where the service account credentials are not being accepted. Here are some steps and considerations to help troubleshoot and resolve this issue: ### Steps to Troubleshoot 1. Verify Service Account Credentials: Ensure that the JSON key file for the service account is correctly generated and contains all necessary information. Follow these steps to create and verify the service account: - Open the [Service Accounts page](https://console.developers.google.com/iam-admin/serviceaccounts). - Select your project and create a new service account if you haven't already. - Assign the Viewer role to the service account. - Generate a new JSON key file and download it. This file should contain fields like
type
,
project_id
,
private_key_id
,
private_key
, etc. For detailed steps, refer to the [Google service account with JSON key file setup guide](https://docs.airbyte.com/integrations/sources/google-search-console#google-service-account-with-json-key-file-recommended-for-airbyte-open-source). 2. Check Permissions: Ensure that the service account has the necessary permissions to access the Google Search Console API. The service account should have at least Viewer permissions. 3. Enable Google Search Console API: Make sure that the Google Search Console API is enabled for your project. You can do this from the [API Console](https://console.cloud.google.com/apis/credentials). 4. Validate JSON Key Format: Ensure that the JSON key file is correctly formatted and contains no errors. The key should start with:
Copy code
json
   {
     "type": "service_account",
     "project_id": "YOUR_PROJECT_ID",
     "private_key_id": "YOUR_PRIVATE_KEY_ID",
     "private_key": "YOUR_PRIVATE_KEY",
     ...
   }
### Common Issues and Solutions - Invalid Credentials: If the credentials are invalid, you might see errors like
UnauthorizedServiceAccountError
. Double-check the JSON key file and ensure it matches the service account you created. - Domain Validation Error: If you encounter errors related to domain validation, such as
InvalidSiteURLValidationError
, it might be due to insufficient permissions or incorrect site URLs. Ensure that the site URLs you are trying to access are verified in Google Search Console. - Version Compatibility: Sometimes, specific versions of the connector might have issues. If you are using an older version, consider updating to the latest version of the Google Search Console connector. ### Example Error and Solution From the forum post, a user experienced a similar issue and resolved it by ensuring the credentials were correct:
"I believe the credentials I was inputting were invalid, I have managed to successfully connect now with both old and new versions." ([Forum Post](https://discuss.airbyte.io/t/2882))
It looks like you're encountering an issue with the Google Search Console connector in Airbyte OSS where the service account credentials are not being accepted. Here are some steps and considerations to help troubleshoot and resolve this issue: ### Steps to Troubleshoot 1. Verify Service Account Credentials: Ensure that the JSON key file for the service account is correctly generated and contains all necessary information. Follow these steps to create and verify the service account: - Open the [Service Accounts page](https://console.developers.google.com/iam-admin/serviceaccounts). - Select your project and create a new service account if you haven't already. - Assign the Viewer role to the service account. - Generate a new JSON key file and download it. This file should contain fields like
type
,
project_id
,
private_key_id
,
private_key
, etc. For detailed steps, refer to the [Google service account with JSON key file setup guide](https://docs.airbyte.com/integrations/sources/google-search-console#google-service-account-with-json-key-file-recommended-for-airbyte-open-source). 2. Check Permissions: Ensure that the service account has the necessary permissions to access the Google Search Console API. The service account should have at least Viewer permissions. 3. Enable Google Search Console API: Make sure that the Google Search Console API is enabled for your project. You can do this from the [API Console](https://console.cloud.google.com/apis/credentials). 4. Validate JSON Key Format: Ensure that the JSON key file is correctly formatted and contains no errors. The key should start with:
Copy code
json    {      "type": "service_account",      "project_id": "YOUR_PROJECT_ID",      "private_key_id": "YOUR_PRIVATE_KEY_ID",      "private_key": "YOUR_PRIVATE_KEY",      ...    }
### Common Issues and Solutions - Invalid Credentials: If the credentials are invalid, you might see errors like
UnauthorizedServiceAccountError
. Double-check the JSON key file and ensure it matches the service account you created. - Domain Validation Error: If you encounter errors related to domain validation, such as
InvalidSiteURLValidationError
, it might be due to insufficient permissions or incorrect site URLs. Ensure that the site URLs you are trying to access are verified in Google Search Console. - Version Compatibility: Sometimes, specific versions of the connector might have issues. If you are using an older version, consider updating to the latest version of the Google Search Console connector. ### Example Error and Solution From the forum post, a user experienced a similar issue and resolved it by ensuring the credentials were correct: > "I believe the credentials I was inputting were invalid, I have managed to successfully connect now with both old and new versions." ([Forum Post](https://discuss.airbyte.io/t/2882)) If you continue to face issues, you might want to create a GitHub issue for further assistance from the Airbyte team: > "In the meantime I have created a github issue: [Google Search Console - Service Account Key Authentication Failure](http://github.com/airbytehq/airbyte)" ([Forum Post](https://discuss.airbyte.io/t/2882)) By following these steps, you should be able to troubleshoot and resolve the
UnauthorizedServiceAccountError
when setting up the Google Search Console connector in Airbyte OSS. If the problem persists, consider reaching out to the Airbyte community or support for further assistance.
d
hi @kapa.ai, could this error also be related to the fact that search console is not a verified property yet?
k
Hi, Yes, the error could indeed be related to the fact that the Google Search Console property is not verified yet. According to the [Google Search Console source connector documentation](https://docs.airbyte.com/integrations/sources/google-search-console#google-search-console), one of the prerequisites for setting up the connector is having a verified property in Google Search Console. Without a verified property, the connector will not be able to access the necessary data, which could lead to errors during the connection setup. Here are the relevant prerequisites from the documentation: - A verified property in Google Search Console (or the list of the
Site URLs
(Website URL Properties)) - Google Search Console API enabled for your project (Airbyte Open Source only) If your property is not verified, you should follow [Google's instructions](https://support.google.com/webmasters/answer/7687615?sjid=11103698321670173176-NA) to verify it. Once verified, you can proceed with setting up the connector. For more details, you can refer to the [setup guide](https://docs.airbyte.com/integrations/sources/google-search-console#google-search-console). If you continue to face issues, please ensure that all other prerequisites and configurations are correctly set up. Hope this helps!