Channels
Create a Discord publisher connection
POST
sessionCookiecookie
better-auth.session_token<token>The Better Auth email/password session cookie used by the web application.
projectId*stringLength
1 <= lengthchannelId*stringLength
1 <= length- body
botToken*stringLength
32 <= length <= 4096channelId*stringLength
17 <= length <= 20Response for status 200
application/json- response
connection*curl -X POST 'https://postbot.example/api/projects/string/channels/string/publisher/discord/connect' \
-H 'Content-Type: application/json' \
-d '{
"botToken": "stringstringstringstringstringst",
"channelId": "stringstringstrin"
}'Example Response
{
"connection": {
"id": "string",
"projectId": "string",
"publisherId": "string",
"channelId": "string",
"kind": "string",
"credentialId": "string",
"endpointUrl": "string",
"destination": {
"type": "account",
"id": "string",
"name": "string"
},
"authentication": {
"kind": "none"
},
"providerId": "string",
"externalAccountId": "string",
"externalAccountName": "string",
"scopes": [
"string"
],
"state": "active",
"connectedByActorId": "string",
"createdAt": 0,
"updatedAt": 0
}
}