English
English
Appearance
English
English
Appearance
/public/account/youtube/connectLink a selected YouTube channel to your workspace using its channel ID and access token.
Authorization: Basic Base64(AccessKey:SecretKey))| Field | Type | Required | Description |
|---|---|---|---|
channelId | string | Yes | The unique identifier of the YouTube Channel to connect. |
token | string | Yes | Access token received from the exchange step. |
curl -X POST "https://api.repliz.com/public/account/youtube/connect" \
-H "Authorization: Basic $(echo -n 'YOUR_ACCESS_KEY:YOUR_SECRET_KEY' | base64)" \
-H "Content-Type: application/json" \
-d '{"channelId":"UCxxxxxxxxxxxxxx","token":"ACCESS_TOKEN"}'import axios from 'axios';
const response = await axios.post(
'https://api.repliz.com/public/account/youtube/connect',
{
channelId: 'UCxxxxxxxxxxxxxx',
token: 'ACCESS_TOKEN',
},
{
auth: {
username: 'YOUR_ACCESS_KEY',
password: 'YOUR_SECRET_KEY',
},
},
);
console.log(response.data);const credentials = btoa('YOUR_ACCESS_KEY:YOUR_SECRET_KEY');
const response = await fetch(
'https://api.repliz.com/public/account/youtube/connect',
{
method: 'POST',
headers: {
Authorization: `Basic ${credentials}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
channelId: 'UCxxxxxxxxxxxxxx',
token: 'ACCESS_TOKEN',
}),
},
);
const data = await response.json();
console.log(data);{
"accountId": "69e97477a795504e0786cec6"
}{
"code": 401,
"message": "unauthorized"
}