Transcript V1
Create/Modify a Transcript
Creates or Modifies an existing Transcript
POST /api/transcript
https://api.cookie-api.com/api/transcript
URL Parameters | |
---|---|
channel_id | Your Channel ID |
{ "bot_token": "Your Bot's Token", "title": "contnet", //optional "description": "content", //optional "password": "content" //optional}
- title: Overwrites the default embed title
- description: Overwrites the default embed description
- password: Set a password to protect your Transcript from unauthorized access
You can remove a Transcript Password by simply doing this request again but leaving out the password parameter. To change the Password simply use the password parameter again just with your new Password this time.
Make sure to replace “Your Channel ID” and “Your Bot Token” with your Channel ID and your Bot Token.
Your bot’s token will not be saved and is securely encrypted in the API request. For more information, please refer to our Privacy Policy and Security Page.
curl --location 'http://api.cookie-api.com/api/transcript?Authorization=API_Key&channel_id=Channel_ID' \--header 'Content-Type: application/json' \--data '{ "bot_token": "Bot Token"}'
import requests
url = 'http://api.cookie-api.com/api/transcript'headers = { 'Content-Type': 'application/json'}
data = { 'bot_token': 'Bot Token'}
params = { 'Authorization': 'API_Key', 'channel_id': 'Channel_ID'}
response = requests.post(url, headers=headers, params=params, json=data)print(response.json())
const fetch = require('node-fetch');
const url = 'http://api.cookie-api.com/api/transcript';const headers = { 'Content-Type': 'application/json'};
const data = { bot_token: 'Bot Token'};
const params = new URLSearchParams({ Authorization: 'API_Key', channel_id: 'Channel_ID'});
fetch(`${url}?${params}`, { method: 'POST', headers, body: JSON.stringify(data)}).then(res => res.json()).then(data => console.log(data)).catch(err => console.error(err));
package main
import ( "bytes" "encoding/json" "fmt" "log" "net/http" "net/url")
func main() { url := "http://api.cookie-api.com/api/transcript" params := url.Values{} params.Set("Authorization", "API_Key") params.Set("channel_id", "Channel_ID")
data := map[string]interface{}{ "bot_token": "Bot Token", }
jsonData, err := json.Marshal(data) if err != nil { log.Fatal(err) }
req, err := http.NewRequest("POST", url+"?"+params.Encode(), bytes.NewBuffer(jsonData)) if err != nil { log.Fatal(err) }
req.Header.Set("Content-Type", "application/json")
client := &http.Client{} resp, err := client.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)}
const https = require('https');
const data = JSON.stringify({ bot_token: 'Bot Token'});
const params = new URLSearchParams({ Authorization: 'API_Key', channel_id: 'Channel_ID'}).toString();
const options = { hostname: 'api.cookie-api.com', path: '/api/transcript?' + params, method: 'POST', headers: { 'Content-Type': 'application/json', 'Content-Length': Buffer.byteLength(data) }};
const req = https.request(options, res => { let responseData = ''; res.on('data', chunk => { responseData += chunk; }); res.on('end', () => { console.log(JSON.parse(responseData)); });});
req.on('error', error => { console.error(error);});
req.write(data);req.end();
require 'net/http'require 'json'require 'uri'
uri = URI.parse('http://api.cookie-api.com/api/transcript')params = { 'Authorization' => 'API_Key', 'channel_id' => 'Channel_ID'}uri.query = URI.encode_www_form(params)
request = Net::HTTP::Post.new(uri)request['Content-Type'] = 'application/json'request.body = { 'bot_token' => 'Bot Token'}.to_json
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http| http.request(request)end
puts JSON.parse(response.body)
use reqwest::blocking::Client;use reqwest::header::HeaderMap;use serde::{Deserialize, Serialize};
#[derive(Serialize)]struct TranscriptRequest { bot_token: String,}
fn main() { let url = "http://api.cookie-api.com/api/transcript"; let client = Client::new(); let mut headers = HeaderMap::new(); headers.insert("Authorization", "API_Key".parse().unwrap());
let request_body = TranscriptRequest { bot_token: "Bot Token".to_string(), };
let res = client .post(url) .headers(headers) .json(&request_body) .query(&[("channel_id", "Channel_ID")]) .send() .unwrap();
println!("{}", res.text().unwrap());}
Responses
{ "success": true, "message": "Transcript was created/modified", "url": "https://www.cookie-api.com/transcripts/example/1308823896161648711-example-transcript.html"}
Please note that this endpoint may take up to 6 seconds to execute and allows exporting up to 500 messages per transcript maximum.
View a Transcript
To view a transcript, use the URL provided by the ‘Create a Transcript’ endpoint. If you’ve lost that URL, you can view all your transcripts in the Transcript module on the dashboard.
If you’d like to see a demonstration of how transcripts are formatted, feel free to check out this example. (If there should be a password on it, the password is “cookie”)
Download a Transcript
Returns a Transcript as an HTML File
GET /api/transcript/download
https://api.cookie-api.com/api/transcript/download
If you have set a password you need to include the password in the URL like this:
<Transcript URL>/download?password=<Your password>
Delete a Transcript
Deletes a Transcript
DELETE <Transcript URL>/delete
curl --location --request DELETE 'https://api.cookie-api.com/transcripts/1025427725021872158/1266812795920322673-example.html/delete?Authorization=API_Key'
import requests
url = 'https://api.cookie-api.com/transcripts/1025427725021872158/1266812795920322673-example.html/delete'headers = { 'Authorization': 'API_Key'}
response = requests.delete(url, headers=headers)print(response.status_code)
const fetch = require('node-fetch');
const url = 'https://api.cookie-api.com/transcripts/1025427725021872158/1266812795920322673-example.html/delete';const headers = { 'Authorization': 'API_Key'};
fetch(url, { method: 'DELETE', headers}).then(res => res.json()).then(data => console.log(data)).catch(err => console.error(err));
package main
import ( "fmt" "log" "net/http")
func main() { url := "https://api.cookie-api.com/transcripts/1025427725021872158/1266812795920322673-example.html/delete" req, err := http.NewRequest("DELETE", url, nil) if err != nil { log.Fatal(err) }
req.Header.Set("Authorization", "API_Key")
client := &http.Client{} resp, err := client.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)}
const https = require('https');
const options = { hostname: 'api.cookie-api.com', path: '/transcripts/1025427725021872158/1266812795920322673-example.html/delete', method: 'DELETE', headers: { 'Authorization': 'API_Key' }};
const req = https.request(options, res => { let responseData = ''; res.on('data', chunk => { responseData += chunk; }); res.on('end', () => { console.log(responseData); });});
req.on('error', error => { console.error(error);});
req.end();
require 'net/http'require 'uri'
uri = URI.parse('https://api.cookie-api.com/transcripts/1025427725021872158/1266812795920322673-example.html/delete')
request = Net::HTTP::Delete.new(uri)request['Authorization'] = 'API_Key'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http| http.request(request)end
puts "Response Status: #{response.code}"
use reqwest::blocking::Client;use reqwest::header::HeaderMap;
fn main() { let url = "https://api.cookie-api.com/transcripts/1025427725021872158/1266812795920322673-example.html/delete"; let client = Client::new();
let mut headers = HeaderMap::new(); headers.insert("Authorization", "API_Key".parse().unwrap());
let res = client .delete(url) .headers(headers) .send() .unwrap();
println!("Response Status: {}", res.status());}
Responses
{ "success": true, "message": "Transcript deleted successfully"}
Please note: You can only delete your transcripts with your API Key.