Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Calendar Event - entryPoints #2597

Closed
A35G opened this issue May 22, 2024 · 3 comments
Closed

Google Calendar Event - entryPoints #2597

A35G opened this issue May 22, 2024 · 3 comments

Comments

@A35G
Copy link

A35G commented May 22, 2024

Hi,
via the API I am able to generate a new event on Calendar (with Google Meet included) but if I try to set a password, pin, passcode, etc.. they return in the JSON of the event, always empty.

Has anyone been able via the API, to set them?

The same happens with the 'notes' field.

Example:

        'conferenceData' => [
            'createRequest' => [
                'requestId' => 'aaaaaaaa',
                'conferenceSolutionKey' => [
                    'type' => 'hangoutsMeet'
                ]
            ],
            'entryPoints'   =>  [[
                'entryPointType' => 'video',
                'pin' => '123456',
                'passcode' => '123456',
                'password' => '123456'
            ]],
            'notes' => 'Lorem Ipsum Dolor'
        ],
@Hectorhammett
Copy link
Contributor

Hello @A35G

Do you have a code example to take a look at? :)

@Hectorhammett
Copy link
Contributor

Closing this due inactivity. Feel free to comment back. If you have a code example the better!

@A35G
Copy link
Author

A35G commented Jul 18, 2024

Hi @Hectorhammett,
please forgive the delay in responding.

Below is a portion of code used as an example:

require __DIR__ . '/../vendor/autoload.php';

use function GuzzleHttp\Promise\all;

$authCode = "";

$client = manageClient($authCode);

$srvc = new Google\Service\Drive($client);
$service = new Google\Service\Calendar($client);

$calendarId = 'primary';
$newmeet = new Google\Service\Calendar\Event(array(
    'summary' => 'A simple Test',
    'location' => 'Lorem Ipsum Dolor',
    'description' => 'It\' a simple test with Meet event',
    'colorId'   =>  '4',
    'attachments' => array(),
    'start' => array(
        'dateTime' => '2024-05-27T13:45:00+02:00',
        'timeZone' => 'Europe/Rome',
    ),
    'end' => array(
        'dateTime' => '2024-05-27T13:50:00+02:00',
        'timeZone' => 'Europe/Rome',
    ),
    'recurrence' => array(
        'RRULE:FREQ=DAILY;COUNT=1'
    ),
    'attendees' => array(
        array(
            'displayName'   =>  'Mario Rossi',
            'email'         =>  'm.rossi@gmail.tld'
        )
    ),
    'conferenceData' => [
        'createRequest' => [
            'requestId' => 'zazazaza1',
            'conferenceSolutionKey' => [
                'type' => 'hangoutsMeet'
            ]
        ],
        'entryPoints'   =>  [[
            'entryPointType' => 'video',
            'pin' => '123456',
            'passcode' => '123456',
            'password' => '123456'
        ]],
        'notes' => 'Lorem Ipsum Dolor'
    ],
    'reminders' => array(
        'useDefault' => false,
        'overrides' => array(
            array(
                'method'    =>  'email',
                'minutes'   =>  24 * 60
            ),
            array(
                'method'    =>  'popup',
                'minutes'   =>  10
            )
        )
    )
));

$service->events->insert($calendarId, $newmeet,array(
    'conferenceDataVersion' =>  1,
    'sendUpdates'           =>  'all',
    'supportsAttachments'   =>  true
));

I hope it will fit as an example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants