getGoogleAPIKeys

POST public/getGoogleAPIKeys

Returns the Google API key the SC//AcuVigil mobile app uses for Google services such as Google Maps.

Important: The response contains a secret API key. Don't log, share, or store it.

Request syntax

curl https://apiv2.acumera.net/public/getGoogleAPIKeys \
  --cookie av_session.txt

The username, password, and tfa_token parameters are also accepted, and are required only if the client hasn't already signed in with login. See Getting started with the SC//AcuVigil API.

Request parameters

This function takes no parameters of its own.

Response syntax

{
    "success": "string",
    "data": {
        "google_api_credentials": {
            "key": "string"
        }
    }
}

Response parameters

If the call succeeds, success is "1" and the following data is returned.

Field Description
google_api_credentials.key The Google API key.

Errors

If the call fails, success is "0", and returnCode and returnMessage describe the problem. The HTTP status is still 200.

Return code Message Cause
GOOGLE_API_CREDENTIALS_NOT_FOUND One or more of the Google API credentials could not be found. The key isn't configured on the server. Contact Scale Computing Support.
INVALID_LOGIN We were unable to log you in. Make sure you entered the correct username, password and 2FA code. You haven't signed in, your session has ended, or the credentials sent with the call are wrong.

Examples

Example: Get the Google API key

curl https://apiv2.acumera.net/public/getGoogleAPIKeys \
  --cookie av_session.txt

Response (value replaced with a placeholder):

{
    "success": "1",
    "data": {
        "google_api_credentials": {
            "key": "<google_api_key>"
        }
    }
}