Connector credentials

Update a connector credential

Updates the specified connector credential.

When you make a PATCH request, Nylas replaces all data in the nested object with the information included in your request. For more information, see Updating objects.

patch/v3/connectors/{provider}/creds/{id}

Path parameters

provider'google' | 'microsoft' | 'imap' | 'icloud' | 'yahoo' | 'ews' | 'virtual-calendar' | 'zoom' | 'nylas' required
Example:google
idstring required

Request body

namestring

The credential name.

credential_dataobject

An object that specifies some special information required for the credential. This information is securely encoded and stored, and is not visible to users.

For the Google App Permission flow, this field must contain the private_key_id, private_key, and client_email.

For the Microsoft App Permission flow, this field must contain the Azure client_id and client_secret.

To use the credential to override a connector, this field must contain the client_id and client_secret.

Example request

{
  "name": "My first Google credential",
  "credential_data": {
    "type": "service_account",
    "project_id": "marketplace-sa-test",
    "private_key_id": "abcd1234defg5678",
    "private_key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n",
    "client_email": "some-name@marketplace-sa-test.iam.gserviceaccount.com",
    "client_id": "123456789",
    "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/some-name%40marketplace-sa-test.iam.gserviceaccount.com"
  }
}

Response

Returns the updated credential.

request_idstring

The request ID.

Example response

{
  "request_id": "5967ca40-a2d8-4ee0-a0e0-6f18ace39a90",
  "data": {
    "id": "e19f8e1a-eb1c-41c0-b6a6-d2e59daf7f47",
    "name": "My first Google credential",
    "created_at": 1617817109,
    "updated_at": 1617817109
  }
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.