POST
/
oauth-connect
curl --request POST \
  --url https://api.withampersand.com/v1/oauth-connect \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '{
  "providerWorkspaceRef": "salesforce-instance-domain",
  "providerMetadata": {},
  "projectId": "my-project",
  "groupRef": "group-123",
  "groupName": "Organization Name",
  "consumerRef": "user_123456",
  "consumerName": "John Doe",
  "providerAppId": "32356abe-d2fd-49c7-9030-abdcbc6456d4",
  "provider": "salesforce",
  "enableCSRFProtection": true
}'
"<string>"

Authorizations

X-Api-Key
string
header
required

Body

application/json
projectId
string
required

The Ampersand project ID.

Example:

"my-project"

groupRef
string
required

The ID that your app uses to identify the group of users for this Connection, this can be an Org ID, workspace ID, etc.

Example:

"group-123"

consumerRef
string
required

The ID that your app uses to identify the user whose SaaS credential will be used for this OAuth flow.

Example:

"user_123456"

provider
string
required

The provider that this app connects to.

Example:

"salesforce"

providerWorkspaceRef
string

The identifier for the provider workspace (e.g. the Salesforce subdomain).

Example:

"salesforce-instance-domain"

providerMetadata
object
groupName
string

The display name for the group. Defaults to groupRef if not provided.

Example:

"Organization Name"

consumerName
string

The display name for the consumer. Defaults to consumerRef if not provided.

Example:

"John Doe"

providerAppId
string

ID of the provider app, returned from a CreateProviderApp call. If omitted, the default provider app that was set up on the Ampersand Dashboard is assumed.

Example:

"32356abe-d2fd-49c7-9030-abdcbc6456d4"

enableCSRFProtection
boolean

Response

200
text/plain
OK

URL to render