PHP code example of codepreneur / laravel-fathom

1. Go to this page and download the library: Download codepreneur/laravel-fathom library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

codepreneur / laravel-fathom example snippets


use Codepreneur\Fathom\Facades\Fathom;

$meetings = Fathom::meetings()->list();
$transcript = Fathom::recordings()->transcript($recordingId);
$summary = Fathom::recordings()->summary($recordingId);

$page = Fathom::meetings()->list();

foreach ($page->items as $meeting) {
    echo $meeting->title;
    echo $meeting->recordingId;
    echo $meeting->recordedBy->email;
}

$page = Fathom::meetings()->list([
    'recorded_by' => ['[email protected]'],
    'teams' => ['Sales', 'Engineering'],
    'created_after' => '2025-01-01T00:00:00Z',
    'created_before' => '2025-12-31T23:59:59Z',
    'meeting_type' => 'Quarterly Business Review',
    'calendar_invitees_domains_type' => 'one_or_more_external',
    '

$types = Fathom::meetings()->types();

$page = Fathom::meetings()->list();

foreach ($page->items as $meeting) {
    // process meeting
}

if ($page->hasMore()) {
    $nextPage = Fathom::meetings()->next($page);
}

$transcript = Fathom::recordings()->transcript($recordingId);

foreach ($transcript->entries as $entry) {
    echo $entry->speaker->displayName;
    echo $entry->speaker->matchedCalendarInviteeEmail;
    echo $entry->text;
    echo $entry->timestamp; // e.g. "00:05:32"
}

$transcript = Fathom::recordings()->transcript($recordingId, [
    'destination_url' => 'https://example.com/callback',
]);

$summary = Fathom::recordings()->summary($recordingId);

echo $summary->templateName;
echo $summary->markdown;

$download = Fathom::recordings()->requestDownload($recordingId);

while ($download->isProcessing()) {
    sleep(2);
    $download = Fathom::recordings()->downloadStatus($recordingId, $download->downloadId);
}

if ($download->isCompleted()) {
    $url = $download->video?->url ?? $download->audio?->url;
}

$teams = Fathom::teams()->list();

foreach ($teams->items as $team) {
    echo $team->name;
}

$members = Fathom::teamMembers()->list(['team' => 'Sales']);

foreach ($members->items as $member) {
    echo $member->name;
    echo $member->email;
}

$users = Fathom::users()->list();

$webhook = Fathom::webhooks()->create([
    'destination_url' => 'https://example.com/webhooks/fathom',
    'triggered_for' => ['my_recordings'],
    'ok->secret;

Fathom::webhooks()->delete($webhookId);

if (Fathom::webhooks()->verify($request)) {
    $meeting = Fathom::webhooks()->meeting($request);
}

$payload = Fathom::webhooks()->payload($request);
$meeting = Fathom::webhooks()->meeting($request);

use App\Http\Controllers\FathomWebhookController;

Route::post('/webhooks/fathom', FathomWebhookController::class)
    ->middleware('fathom.webhook');

use Codepreneur\Fathom\Events\FathomMeetingReceived;
use Codepreneur\Fathom\Events\FathomWebhookReceived;

Event::listen(FathomMeetingReceived::class, StoreMeeting::class);
Event::listen(FathomWebhookReceived::class, LogWebhook::class);

Fathom::webhooks()->dispatchEvents($request);

use Codepreneur\Fathom\Exceptions\RateLimitException;

try {
    Fathom::meetings()->list();
} catch (RateLimitException $e) {
    $e->limit();       // 60
    $e->remaining();   // 0
    $e->reset();       // seconds remaining in window
    $e->retryAfter();  // seconds to wait
    $e->resetAt();     // CarbonImmutable
}

$meeting = Fathom::meetings()->list()->items[0];
$meeting->title;              // typed property
$meeting->raw()['new_field']; // forward-compatible access
bash
php artisan vendor:publish --tag=fathom-config