How is your experience with the OutSystems Community?
12
Views
5
Comments
where to put the credential to use google GoogleCloudVision module?
Question
Application Type
Reactive

Hi there,

I am wondering 

I used the forge GoogleCloudVision

and i have credential in json format. Where to put the credential?


thanks

2026-05-21 04-48-12
Deepa Tiwari

Hi @IQ78

You cannot pass the JSON file directly. You need to retrieve the API key from your Google account and use it in the Server Action.

Alternatively, if the JSON file contains the required API credentials, please extract the relevant information and implement the authentication logic in the Server Action accordingly.

Please ensure that the credentials are handled securely and are not exposed on the client side.

2025-01-09 14-56-57
IQ78

I o not have the google api, only json like this:

{

  "type": "service_account",

  "project_id": "xxxxx7",

  "private_key_id": "asasdadsa",

  "private_key": "\n",

  "client_email": "ddxx",

  "client_id": "12222",

  "auth_uri": "https://222h",

  "token_uri": "https://oauth2.2222.com/token",

  "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",

  "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/sss",

  "universe_domain": "googleapis.com"

}

thanks

2023-12-26 10-35-28
OutSystems Neo
Staff
AI Generated

You should not upload the JSON file itself into the GoogleCloudVisionOCR component. Instead, you extract the API key (or required fields) from that JSON and pass it into the component’s actions.

In OutSystems 11, the usual flow is:

  1. Get the API key from the JSON

    • If your JSON is a standard Google service account file, it typically doesn’t contain a simple API key, but client email, private key, etc.
    • The Forge component GoogleCloudVisionOCR expects an API key in the GoogleAPIKey input parameter of each action in the extension. You can see this in the demo module that comes with the component. Google Cloud Vision API integration to make an OCR app for Mobile
  2. Store the key securely

    • Go to Service Center → Factory → Site Properties of your module.
    • Create a Site Property (e.g. GoogleCloudVisionAPIKey) and put the key value there.
    • Site Properties are read on the server side and are not exposed directly in client code.
  3. Pass the key into the Forge actions

    • In Service Studio, when you call an action from the GoogleCloudVisionOCR extension (e.g. DetectText, DetectLabels, etc.), set the GoogleAPIKey input parameter to Site.GoogleCloudVisionAPIKey (or whatever name you chose).
    • The demo app shipped with the component shows exactly where that parameter is used. Google Cloud Vision API integration to make an OCR app for Mobile
  4. If you must use the JSON itself (service account / JWT)

    • That’s an advanced scenario: you usually need to implement JWT/OAuth2 in an Extension (C#) or use a REST integration that exchanges the JSON credentials for an access token.
    • In that case, you typically:

So, in summary:

  • For the Forge GoogleCloudVisionOCR component, put the API key extracted from your JSON into a Site Property and pass that value to the GoogleAPIKey input parameter of the component actions.
  • Do not try to reference the JSON file path directly on the server.
This answer was AI-generated. Please read it carefully and use the forums for clarifications
2025-01-09 14-56-57
IQ78
hot to extract the api key? i see "private_key_id", but it does not work.
2023-12-26 10-35-28
OutSystems Neo
Staff
AI Generated

The private_key_id is not the API key and won’t work where an API/key value is expected.

In OutSystems O11, when a provider requires “API key” authentication (for example, SendGrid or Google APIs), you typically need to:

  1. Get the API key from the provider’s console

    • For SendGrid:
      • Go to Settings → API Keys in the SendGrid dashboard.
      • Click Create API Key, choose the permissions, and copy the generated API key string (this is usually a long random string, not an ID).
    • For Google APIs (e.g., Maps, Places):
      • Go to Google Cloud Console → APIs & Services → Credentials.
      • Click Create credentials → API key, then copy the generated key.
        These keys look like SG.xxxxx... (SendGrid) or AIza... (Google), not private_key_id. The private_key_id field in JSON service accounts is just a metadata identifier, not the actual secret used for calls. No documentation available to guide a developer to obtain and configure the API Key
  2. Configure it in OutSystems

    • For SMTP with SendGrid, set in Service Center → Administration → Email:
      • SMTP Server: smtp.sendgrid.net
      • Port: 587
      • Username: apikey (exactly this word, all lowercase)
      • Password: the API key value, not the API key ID nor private_key_id. API/key method instead of SMTP method
  3. Do not confuse API keys with private keys used for JWT or RSA signing

    • If you’re using actions like CreateSignedAsymmetricTokenWithPemKey, you need a RSA private key in the correct PEM format (PKCS#1 or PKCS#8, depending on the component), not an API key and not private_key_id. error : invalid_request

If you share which external service you’re integrating (SendGrid, Google, AWS, etc.) and where you’re trying to use the “API key” inside OutSystems (REST, SMTP, JWT component, etc.), I can outline the exact field you should copy from the provider’s configuration.

This answer was AI-generated. Please read it carefully and use the forums for clarifications
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.