如何使用 WebEx URL/XML API 为活动注册用户? [英] How can I use the WebEx URL/XML API to register a user for an event?

查看:45
本文介绍了如何使用 WebEx URL/XML API 为活动注册用户?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为客户开发一个网站,用户可以在该网站上注册活动.现在,客户想要集成 WebEx 并在用户在我们的网站上注册活动并支付全部费用后自动将用户注册到 WebEx 活动.

I'm working on a website for a client where users can sign up for events. Now the client wants to integrate WebEx and automatically register users to WebEx events after they signed up for the event on our site and paid for it an all.

我检查了他们的 API,但找不到方法来做到这一点:

I checked out their API and I could not find a way to do this:

使用 XML API,我可以获得可用事件的列表,甚至可以创建新用户,但我无法为事件注册用户.

With the XML API I can get a list of available events and even create a new user, but I cannot register a user for an event.

使用 URL API 我可以登录一个用户(我在使用 XML API 之前创建的)但是我不能注册一个事件的用户,根本就没有这个功能.有一个注册事件"功能,但该功能用于会议,不以用户 ID 作为参数,而是以用户名/姓氏和电子邮件地址作为参数.

With the URL API I can login a user (that I created before using the XML API) but I cannot register a user for an event, there simply is no function for that. There's an "Enroll Event" function, but that one is for meetings and doesn't take a user's ID as a parameter, but rather its first/last name and email address.

有人试过吗?我在这里不知所措,不知道我还能尝试什么.

Anyone ever tried this before? I'm at a loss here and got no idea what else I could try.

推荐答案

自从 3 月份提出这个问题以来,您可能不会还在寻找答案,但这可能会对其他人有所帮助.

Since this was asked in March, you probably aren't still looking for an answer, but this might help others down the line.

如果您的网站上有用户填写以注册 WebEx 活动的表单,您可以使用 URL API 和此活动的会议密钥将该表单数据发布"到 WebEx.要查找会议密钥,请以主持人身份登录 WebEx,然后转至主持活动 -> 站点活动并单击您的活动.活动编号是您的会议密钥,减去任何空格.

If you have a form on your website that a user fills out to enroll in a WebEx Event, you can "POST" that form data to WebEx using the URL API and this event's meeting key. To find the meeting key, log in to WebEx as a host and go to Host an Event -> Site Events and click on your event. The Event Number is your meeting key, minus any white space.

当用户提交表单时,您需要构建一个 WebEx 可读的 URL.这通常如下所示:https://yourcompany.webex.com/yourcompany/m.php?AT=EN,并且应该作为表单的动作放置.

When a user submits the form, you will need to construct a WebEx-readable URL. This generally looks like the following: https://yourcompany.webex.com/yourcompany/m.php?AT=EN, and should be placed as the form's action.

您使用 m.php 来使用会议 API 命令并附加 AT 参数以启动 WebEx 命令.EN 表示您要向活动添加与会者.然后,您可以使用诸如名字 (FN)、姓氏 (LN)、电子邮件 (AE)、公司 (CO) 等内容的命令定义来命名站点上的表单输入字段.属性列表可以在WebEx URL API 文档(第 2-152 页).您的属性应与您要求用户在 WebEx 表单选项中输入的内容相匹配.您还需要在会议密钥中包含一个隐藏字段,如下所示:

You use m.php to use the meetings API commands and append the AT parameter to initiate WebEx commands. The EN means you want to add an attendee to an event. You then name the form input fields on your site using the command definitions for things like first name (FN), last name (LN), email (AE), company (CO), etc. A list of attributes can be found in the WebEx URL API documentation on page 2-152. Your attributes should match what you require the user to input on the WebEx form in its options. You also need to include a hidden field with your meeting key, like so:

<input type="hidden" name="MK" value="123456789" />

就是这样,当您发布表单时,MK 值会作为表单参数包含在内.如果没有您尝试添加人员的活动的特定会议键值,您的请求将失败.

This is so, when you post the form, the MK value gets included as a form parameter. Your request will fail without the specific meeting key value for the event you're trying to add people to.

如果您想将人们引导至感谢页面或您拥有的内容,在他们注册后,您需要包含另一个带有后退 url 的隐藏字段,以便在提交表单后将用户重定向到某处:

If you want to direct people to a thank you page, or what have you, after they sign up, you'll need to include another hidden field with a back url that redirects a user somewhere after the form is submitted:

<input type="hidden" name="BU" value="http://www.yourcompany.com/events/thanks.html" />

当然,您还应该添加一些表单处理以确保用户输入了有效的电子邮件等.您可能还希望包括一些 WebEx 验证,因为当 WebEx 将用户重定向到返回 URL 时,它包括一个参数,说明它是失败还是成功,并解释了原因.附加如下:http://www.yourcompany.com/events/thanks.html?AT=EN&ST=SUCCESS&EI=123456 或类似的东西,其中 ST 是命令的状态,EI 是用户的事件注册 ID.然后,您可以检查用户是否注册成功,或者会议密钥是否无效,或者用户是否已在此电子邮件地址注册,因此未重新注册.

You should also, of course, add some form handling to make sure the user entered a valid email, etc. You might also want to include some WebEx validation, as, when WebEx redirects the user to the back URL, it includes a parameter stating whether it failed or succeeded and explains why. This is appended like so: http://www.yourcompany.com/events/thanks.html?AT=EN&ST=SUCCESS&EI=123456, or something similar, where ST is the status of the command and EI is the user's event registration ID. You can then check to see that the user registered successfully, or if the meeting key was invalid or if the user is already registered at this email address and so wasn't re-registered.

请注意,WebEx URL API 当前不支持 作为程序的一部分创建,其中程序是可应用于多个事件的 WebEx 主题,并且是您在设置 WebEx 事件时可以应用的可选字段.不过,使用 XML API 可以解决这个问题.

A note about this is that the WebEx URL API currently doesn't support events that are created as part of a program, where a program is a WebEx theme that can be applied to multiple events and is an optional field you can apply when setting up a WebEx event. Using the XML API can work around this, though.

希望这能帮助其他人,如果大卫仍在寻找答案,他也可能会有所帮助.

Hope this helps others and maybe David, too, if he's still searching for an answer.

这篇关于如何使用 WebEx URL/XML API 为活动注册用户?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆