Describe the problem/error/question
I am trying to set up credentials for Google Cloud Vision API but I keep getting an error message: 400 which relates to a uri mismatch but that is not the problem, the uri is correct.
I think it has something to do with the client secret, when I download the client secret and look at the JSON, the private key is displayed as one single line when it should be multiple lines denoted by \n
The way I understand it is that for client ID you use “client_email”, for client secret you use “private_key”
Is this correct?
I even tried editing the private key so that it had multiple lines, i deleted the \n and created new lines and that didn’t work either.
Hi @dbox243
Do not remove the \n characters - they are required and n8n interprets them correctly
Copy the entire private key from the JSON file, including the beginning and ending quotes
Paste it exactly as it is in the client secret field
Then open Credentials in n8n
Select Create New Credential
Choose Google Cloud Vision API
Fill out the following fields carefully
Name: A descriptive name for your credential
Client ID: Paste the client_email value from the JSON file
Client Secret: Paste the private_key value from the JSON file exactly as it is, with the \n
Scope: Keep the default scope or adjust as needed
Important: Do not modify the private key by removing the \n or adding actual line breaks
If you continue to have issues, also check that your project is enabled for the Cloud Vision API in the Google Cloud Console
That your service account has the correct permissions
That you are using the latest version of n8n (some older versions had issues with Google credentials)
If this suggestion solved your problem, please mark my post as the solution (blue box with check mark) so that this ongoing discussion does not distract others who want to find out the answer to the original question and click the heart. Thanks 