我在项目中实施了Adobe connect now
会议。我能够使用API成功创建会议,但无法将host
添加到会议中。
调用Adobe Api的方法:-
private static async Task<HttpResponseMessage> CallAdobeApi(string urlSegment, bool isResponseCookieEnabled = false)
{
Uri address = new Uri(_meetingBaseUri + urlSegment);
CookieContainer cookies = new CookieContainer();
HttpClientHandler handler = new HttpClientHandler();
handler.CookieContainer = cookies;
HttpClient client = new HttpClient(handler);
HttpResponseMessage response = client.GetAsync(address).Result;
if (isResponseCookieEnabled)
{
IEnumerable<Cookie> responseCookies = cookies.GetCookies(address).Cast<Cookie>();
foreach (Cookie cookie in responseCookies)
_authSessionToken = cookie.Value;
}
return response;
}
会议主持人添加方法:-,此处principal-id
是meeting-hosts
文件夹的sco-id
id,folder-id
是my-meetings
。根据文档Adobe Connect Documentation Link
public static async Task<HttpResponseMessage> AddMeetingHost(string principalId, string scoId)
{
return await CallAdobeApi($"?action=permissions-update&principal-id={principalId}&acl-id={scoId}&permission-id=host&session={_authSessionToken}");
}