<@U04S8PLJWMT> I'm trying to create a source(Slack...
# ask-ai
t
@kapa.ai I'm trying to create a source(Slack) using OAuth. I already have the secret ID from the whole authentication/authorization process and using it like the below in the source creation request body, I ran into an error:
Copy code
{
  "name": "testSlack",
  "workspaceId": "workspace-UUID",
  "definitionId": "c2281cee-86f9-4a86-bb48-d23286b4c7bd",
  "secretId": "secret-string",
}
k
When creating a Slack source using OAuth and a secret ID, you cannot just provide the
secretId
in the request body. The Airbyte API and connector schema require you to also include a
configuration
object, and—crucially—a
credentials
object inside that configuration, even if you are using a secret ID. For OAuth-based connectors (like Slack), you typically need to specify the
auth_type
within the
credentials
object. The value for
auth_type
is often
"Client"
when using Airbyte-managed OAuth, but you should check the connector specification for the exact value. Here’s how your request body should look:
Copy code
json {   "name": "testSlack",   "workspaceId": "workspace-UUID",   "definitionId": "c2281cee-86f9-4a86-bb48-d23286b4c7bd",   "secretId": "secret-string",   "configuration": {     "credentials": {       "auth_type": "Client"     },     // ...other required Slack configuration fields (e.g., start_date, join_channels, etc.)   } }
If you omit the
credentials
object or the required
auth_type
, you will encounter schema validation errors, such as: >
json schema validation failed when comparing the data to the json schema. Errors: $.credentials: required property 'auth_type' not found
[secretId documentation unclear](https://github.com/airbytehq/airbyte/discussions/48607) So, make sure to include the
credentials
object with the appropriate
auth_type
in your request, along with any other required configuration fields for the Slack connector. If you need the full list of required fields for the Slack connector, refer to the connector's documentation or the Airbyte UI, as these fields (like
start_date
,
join_channels
, etc.) are also mandatory for a successful source creation [Step 2: Set up the Slack connector in Airbyte](https://docs.airbyte.com/integrations/sources/slack#step-2-set-up-the-slack-connector-in-airbyte).