---
title: "Set Credentials for GCP"
method: POST
path: "/gcp/setup/credentials"
tags: ["Accounts"]
---

# Set Credentials for GCP

`POST /gcp/setup/credentials`

Link a Spot account to a GCP Cloud account.

## Parameters

- `#/paths/~1azure~1costs/get/parameters/0` — unresolved $ref

## Request body

- object
  - `serviceAccount` object — Set service account for credentials
    - `type` string — Valid values - service_account
    - `project_id` string — Name of project in GCP
    - `private_key_id` string — Private key ID of JSON key created during prerequisites stage
    - `private_key` string — Private key of JSON key created during prerequisites stage
    - `client_email` string — Email associated with service account
    - `client_id` string — Client ID of service account
    - `auth_uri` string — Authentication uri, Default - https://accounts.google.com/o/oauth2/auth
    - `token_uri` string — Token uri, Default - https://oauth2.googleapis.com/token
    - `auth_provider_x509_cert_url` string — Default - https://www.googleapis.com/oauth2/v1/certs
    - `client_x509_cert_url` string — Should be in following format - "https://www.googleapis.com/robot/v1/metadata/x509/"

## Response `200`

Set Cloud Credentials For GCP Response

- object
  - `request` object — Original request properties
    - `id` string — Unique ID associated with this request
    - `url` string — The URL that was used for the request
    - `method` string — The HTTP **METHOD** used for the request
    - `timestamp` string — When the request was received by Spot
  - `response` object — Response package that includes, status, type and any relevant data.
    - `status` object
      - `code` integer — HTTP status code assigned to this response
      - `message` string — HTTP status message for the respective status code

## Other responses

- `400` — Bad Request

---

[API](https://skmtc.net/spot/apis/spot-by-flexera-api.md) · [All operations](https://skmtc.net/spot/apis/spot-by-flexera-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/spot/spot-by-flexera-api/revisions/72813baf8d47/schema)
