Upload Google Earth Engine service account credentials.

Authentication: JWT token required Authorization: Any authenticated user Content-Type: application/json

Request Body Schema:

{
  "service_account_key": {
    "type": "service_account",
    "project_id": "your-gee-project",
    "private_key_id": "key-id",
    "private_key": "-----BEGIN PRIVATE KEY-----...-----END PRIVATE KEY-----\n",
    "client_email": "service-account@your-gee-project.iam.gserviceaccount.com",
    "client_id": "client-id",
    "auth_uri": "https://accounts.google.com/o/oauth2/auth",
    "token_uri": "https://oauth2.googleapis.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/..."
  }
}

Required Fields:

  • service_account_key: Google service account JSON key object or JSON string

Service Account Key Requirements:

  • Must be a valid Google Cloud service account key
  • Must have Google Earth Engine API access enabled
  • Should have appropriate permissions for your GEE project
  • Can be provided as JSON object or JSON string

Response Schema:

{
  "message": "GEE service account credentials saved successfully"
}

Security Notes:

  • Service account keys are encrypted before storage
  • Keys should be generated specifically for Trends.Earth use
  • Rotate keys regularly following Google Cloud security best practices

Error Responses:

  • 400 Bad Request: Missing/invalid service account key, or validation failed
  • 401 Unauthorized: JWT token required or invalid
  • 404 Not Found: User not found
  • 500 Internal Server Error: Failed to save credentials
post/api/v1/user/me/gee-service-account

Request

Request body

object required

Response

Success

object required

Changes

No recorded changes to this operation across all 6 revisions of this API.