google meet wont accept my generated google meet code?

Viewed 40

Hello I am trying to make a google meet event using the Calendar API I am trying to generate my own meet code in the format XXX-YYYY-ZZZ the meeting is generated but when I try to go in I get the message "Make sure you entered the correct meeting code in the URL"

is there a specific rule I need to follow when generating the code?

my conferenceData code:

if event.Location.Type == models.LocationTypeGoogle && syncType != SyncTypeCancel {
            confId := stringutils.GenerateRandomIdSuitableForGoogleMeetId()
            link := "meet.google.com/" + confId
            entryPoint := &calendar.EntryPoint{
                Uri:            "https://" + link,
                Label:          link,
                EntryPointType: "video",
            }

            gEvent.ConferenceData = &calendar.ConferenceData{
                ConferenceId: confId,
                ConferenceSolution: &calendar.ConferenceSolution{
                    Key: &calendar.ConferenceSolutionKey{
                        Type: "hangoutsMeet",
                    },
                },
            }
            gEvent.ConferenceData.EntryPoints = append(gEvent.ConferenceData.EntryPoints, entryPoint)

code generation function

const lettersForGoogleMeetId = "abcdefghijklmnopqrstuv"
func GenerateRandomIdSuitableForGoogleMeetId() string {
    return generateRandomString(3, lettersForGoogleMeetId) + "-" + generateRandomString(4, lettersForGoogleMeetId) + "-" + generateRandomString(3, lettersForGoogleMeetId)
}
0 Answers
Related