# Participation in ZoomMeeting with Windows, C++SDK

**URL:** <https://devforum.zoom.us/t/participation-in-zoommeeting-with-windows-c-sdk/94183>\
**Category:** Windows\
**Created:** [August 30, 2023, 3:40am UTC](https://devforum.zoom.us/t/participation-in-zoommeeting-with-windows-c-sdk/94183 "2023-08-30T03:40:06Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![n-chubachi](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/n-chubachi/32/51533_2.png) [@n-chubachi](https://devforum.zoom.us/u/n-chubachi)\
**Post date:** [August 30, 2023, 3:40am UTC](https://devforum.zoom.us/t/participation-in-zoommeeting-with-windows-c-sdk/94183/1 "2023-08-30T03:40:06Z")

</div>

Hello.  
I would like to join a Zoom Meeting that I have created using the C++ Zoom SDK on Windows and play camera video and audio on the application screen.  
I have registered Server-To-Server-Oauth as an application and by making that request, it is now possible to create a Meeting.  
Now I would like to participate in this meeting from a C++ Windows application.  
I am trying to join the meeting from “IMeetingService” with Join() or Start() function, but it does not work.

I don’t know where I can get join\_token and customer\_key for meetingService-\>Join.  
In meetingService-\>Start, I pasted the “zak=” part from the URL when I created the meeting with the API, but I get a ZOOM\_SDK\_NAMESPACE::SDKERR\_UNAUTHENTICATION error.

```auto

    // join
    ZOOM_SDK_NAMESPACE::IMeetingService *meetingService;
    ZOOM_SDK_NAMESPACE::SDKError meetingServiceInitReturnVal = ZOOM_SDK_NAMESPACE::CreateMeetingService( &meetingService );
    if ( meetingServiceInitReturnVal == ZOOM_SDK_NAMESPACE::SDKERR_SUCCESS )
    {
        ZOOM_SDK_NAMESPACE::JoinParam joinParam;
        joinParam.userType = ZOOM_SDK_NAMESPACE::SDKUserType::SDK_UT_NORMALUSER;
        joinParam.param.normaluserJoin.meetingNumber = 98765432109;
        joinParam.param.normaluserJoin.psw = L"xxxxxx";
        joinParam.param.normaluserJoin.userName = L"XX";
        joinParam.param.normaluserJoin.join_token = L"???";
        joinParam.param.normaluserJoin.customer_key = L"???";

        ZOOM_SDK_NAMESPACE::SDKError joinReturnVal = meetingService->Join( joinParam );
        if ( joinReturnVal == ZOOM_SDK_NAMESPACE::SDKERR_SUCCESS )
        {
            qDebug() << "Success.";
        }
    }

```

```auto
    // start
    ZOOM_SDK_NAMESPACE::StartParam startMeetingParam;
    ZOOM_SDK_NAMESPACE::StartParam4WithoutLogin startMeetingWithoutLoginParam;

    startMeetingParam.userType = ZOOM_SDK_NAMESPACE::SDK_UT_WITHOUT_LOGIN;

    startMeetingWithoutLoginParam.meetingNumber = 98765432109;
    startMeetingWithoutLoginParam.userName = L"XX"; 
    startMeetingWithoutLoginParam.userZAK = L"...";
    startMeetingWithoutLoginParam.zoomuserType = ZOOM_SDK_NAMESPACE::ZoomUserType_APIUSER;
    startMeetingParam.param.withoutloginStart = startMeetingWithoutLoginParam;

    ZOOM_SDK_NAMESPACE::SDKError startMeetingCallReturnValue( ZOOM_SDK_NAMESPACE::SDKERR_UNKNOWN );
    startMeetingCallReturnValue = meetingService->Start( startMeetingParam );
    if (startMeetingCallReturnValue == ZOOM_SDK_NAMESPACE::SDKError::SDKERR_SUCCESS)
    {
        qDebug() << "Success.";
    }

```

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [August 30, 2023, 8:41am UTC](https://devforum.zoom.us/t/participation-in-zoommeeting-with-windows-c-sdk/94183/2 "2023-08-30T08:41:56Z")

</div>

@n-chubachi ,

Please try to leave join\_token and customer\_key alone for now.

To join a meeting, you should just need to authenticate the SDK, pass in the meeting number and password.

To start a meeting, you will need to authenticate the SDK, pass in the meeting number and userZAK token.

---

<div class="post-metadata">

**Author:** ![n-chubachi](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/n-chubachi/32/51533_2.png) [@n-chubachi](https://devforum.zoom.us/u/n-chubachi)\
**Post date:** [August 30, 2023, 10:01am UTC](https://devforum.zoom.us/t/participation-in-zoommeeting-with-windows-c-sdk/94183/3 "2023-08-30T10:01:56Z")

</div>

Thank you very much. Appreciate it.  
To get zak\_token using the API “/users/me/token?type=zak”.  
To get join\_token using “/meetings/{MeetingNumber}/jointoken/local\_recording”.  
I don’t know the equivalent location for customer\_key.  
Currently, join\_token and customer\_key are commented out.

IAuthService SDKAuth() succeeded by creating the appropriate jwt.  
After the SDKAuth(), the IAuthServiceEvent callback “onAuthenticationReturn()” confirms that the SDK authentication has passed.  
After this, I tried to start and join the Meeting, but I still get the SDKERR\_UNAUTHENTICATION error.

The meeting number and password are set by checking for meetings that exist.

Is there any other possible cause?  
Or is there a mistake in the procedure?

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [August 30, 2023, 10:32am UTC](https://devforum.zoom.us/t/participation-in-zoommeeting-with-windows-c-sdk/94183/4 "2023-08-30T10:32:47Z")

</div>

@n-chubachi ,

The OnAuthenticationReturn can return either sucess or failure. You might need to check this value.  
If the return value is failure, I would recommend looking the JWT token which was used to authenticate the SDK.

If the OnAuthenticationReturn is success, you should be able to join / start meeting with no issues.

> [@n-chubachi](#):
>
> To get zak\_token using the API “/users/me/token?type=zak”.

The token which you are using are correct.

> [@n-chubachi](#):
>
> To get join\_token using “/meetings/{MeetingNumber}/jointoken/local\_recording”.

You might not need to enter this. This specific token is supposed to be entered in app\_privilege\_token

---

<div class="post-metadata">

**Author:** ![n-chubachi](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/n-chubachi/32/51533_2.png) [@n-chubachi](https://devforum.zoom.us/u/n-chubachi)\
**Post date:** [August 31, 2023, 2:58am UTC](https://devforum.zoom.us/t/participation-in-zoommeeting-with-windows-c-sdk/94183/5 "2023-08-31T02:58:56Z")

</div>

Thanks for the advice.  
I checked the return value of OnAuthenticationReturn and it was AUTHRET\_JWTTOKENWRONG. it seems that the JWT token was invalid and the authentication did not pass.

[[Meeting SDK Auth](https://developers.zoom.us/docs/meeting-sdk/auth/#join-meetings-and-webinars-with-the-meeting-sdk-jwt)]

When the JWT token was re-created and executed as shown here, it became AUTHRET\_SUCCESS and the authentication succeeded.  
After the authentication succeeded, I tried to join a Meeting and it succeeded and I am now waiting to join a Meeting! Thank you very much.  
However, when I tried Meeting Start, it failed with SDKERR\_INVALID\_PARAMETER.

```auto
    ZOOM_SDK_NAMESPACE::StartParam startMeetingParam;
    ZOOM_SDK_NAMESPACE::StartParam4WithoutLogin startMeetingWithoutLoginParam;

    startMeetingParam.userType = ZOOM_SDK_NAMESPACE::SDK_UT_WITHOUT_LOGIN;
    startMeetingWithoutLoginParam.zoomuserType = ZOOM_SDK_NAMESPACE::ZoomUserType_APIUSER;
    startMeetingWithoutLoginParam.meetingNumber = meetingNumber;
    startMeetingWithoutLoginParam.userName = userName;
    startMeetingWithoutLoginParam.userZAK = zak_key.c_str();
    startMeetingParam.param.withoutloginStart = startMeetingWithoutLoginParam;

    ZOOM_SDK_NAMESPACE::SDKError startMeetingCallReturnValue( ZOOM_SDK_NAMESPACE::SDKERR_UNKNOWN );
    startMeetingCallReturnValue = meetingService->Start( startMeetingParam );
    if (startMeetingCallReturnValue == ZOOM_SDK_NAMESPACE::SDKError::SDKERR_SUCCESS)
    {
        qDebug() << "Success.";
    }

```

I think the zak token I got from the API is correct. Could this be due to the fact that once the value is held in a string type?

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [August 31, 2023, 3:33am UTC](https://devforum.zoom.us/t/participation-in-zoommeeting-with-windows-c-sdk/94183/6 "2023-08-31T03:33:17Z")

</div>

@n-chubachi ,

I’ll suggest getting the ZAK token again.  
This time round, could you try this endpoint instead?  
`/users/:userId/token?type=zak&ttl=7200`

---

<div class="post-metadata">

**Author:** ![n-chubachi](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/n-chubachi/32/51533_2.png) [@n-chubachi](https://devforum.zoom.us/u/n-chubachi)\
**Post date:** [August 31, 2023, 8:32am UTC](https://devforum.zoom.us/t/participation-in-zoommeeting-with-windows-c-sdk/94183/7 "2023-08-31T08:32:06Z")

</div>

I tried it and the result of Meeting Start is the same: SDKERR\_INVALID\_PARAMETER.  
I did not create any user, so I put “me” in “:userId”.  
To start a meeting, create a user, get a zak token from the userId, and use that zak token. Do I need to use that zak token?

I tried the user creation API “[https://api.zoom.us/v2/users/create](https://api.zoom.us/v2/users/create)” as a test, but it returned a RequestError405 indicating that I am not authorized to do so.

Thank you.

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [September 4, 2023, 1:14am UTC](https://devforum.zoom.us/t/participation-in-zoommeeting-with-windows-c-sdk/94183/8 "2023-09-04T01:14:56Z")

</div>

> [@n-chubachi](#):
>
> To start a meeting, create a user, get a zak token from the userId, and use that zak token. Do I need to use that zak token?

@n-chubachi ,

To start a meeting here’s the typical process.

1. Create a user (if you don’t already have an existing user)
2. Schedule a meeting (You can either use use Create Meeting API, Zoom Client or Zoom portal)
3. Get the user’s ZAK token
4. Use the meetingNumber from 2, username and ZAK to start a meeting

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [October 4, 2023, 11:15am UTC](https://devforum.zoom.us/t/participation-in-zoommeeting-with-windows-c-sdk/94183/9 "2023-10-04T11:15:01Z")

</div>

Closed on October 4, 2023, 11:15am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
