Skip to main content
POST
/
connectors
/
{connectorId}
/
credentials
Create a Credential for a Connector
curl --request POST \
  --url https://production.runalloy.com/connectors/{connectorId}/credentials \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-api-version: <x-api-version>' \
  --data '{
  "userId": "{{userId}}",
  "authenticationType": "oauth2",
  "redirectUri": "http://localhost:3000"
}'
{
  "oauthUrl": "http://localhost:4040/api/strategy/connector/slack/authorize?userId=5eba51a03fe9631316668514&redirectUri=http%3A%2F%2Flocalhost%3A3000&token=abcdefghijklmnopqrstvwxyz123456790"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-api-version
string
default:2025-09
required

API version

Path Parameters

connectorId
string
required

Connector ID

Body

application/json
userId
string
required

User identifier for the credential

Example:

"{{userId}}"

authenticationType
string
required

Type of authentication method

Example:

"oauth2"

authConfigId
string

ID of the auth config you want to create the credential with

Example:

"67a37f29e0aa276e50d7253a"

redirectUri
string<uri>

The URI to which we'll redirect the user after authenticating

Example:

"https://myapp.com"

Response

200 - application/json

Credential created successfully

  • Option 1
  • Option 2
oauthUrl
string<uri>
required

OAuth authorization URL to redirect the user and complete credential linking