Please note: These WebEx forums have replaced the earlier site forums. All the previous threads and posts have been replicated here, and if you subscribed to the previous forums, please re-subscribe. Thank you.
« Back to Meeting Listings

RE: Problem with registering attendees for an event

Combination View Flat View Tree View
Threads [ Previous | Next ]
Hoping you can help with this one.  I'm trying to register an attendee for an event using the URL API.
 
When I use the following URL in a web browser, it all works fine:
https://apidemoeu.webex.com/apidemoeu/m.php?AT=EN&MK=694975055&FN=Steve&LN=Woods&AE=steve345@eloqua.com&TI=title&CO=Eloqua&A1=here&A2=there&CR=USA&CY=Mountainview&ST=CA&ZP=90210&PN=4165511212&BU=http://www.blackstarfish.com/back_test.htm?fURL=sitename

but the following code (in C#), using the same URL returns a page from the web server with
"<h2>Invalid input or system error.  Please try again or contact your site administrator.</h2>"
as text:



HttpWebRequest myRequest;
WebResponse myResponse;
string WebExRegistrationURL = "https://apidemoeu.webex.com/apidemoeu/m.php?AT=EN&MK=694975055&FN=Steve&LN=Woods&AE=steve345@eloqua.com&TI=title&CO=Eloqua&A1=here&A2=there&CR=USA&CY=Mountainview&ST=CA&ZP=90210&PN=4165511212&BU=http://www.blackstarfish.com/back_test.htm?fURL=sitename"
myRequest = (HttpWebRequest)HttpWebRequest.Create(WebExRegistrationURL);
myRequest.Method = "GET";
myRequest.ContentType = "text/html";
myResponse = myRequest.GetResponse();
 
 
Any insights here? Anything more I need to do?






string WebExRegistrationURL = "https://apidemoeu.webex.com/apidemoeu/m.php?AT=EN&MK=694975055&FN=Steve&LN=Woods&AE=steve345@eloqua.com&TI=title&CO=Eloqua&A1=here&A2=there&CR=USA&CY=Mountainview&ST=CA&ZP=90210&PN=4165511212&BU=http://www.blackstarfish.com/back_test.htm?fURL=sitename"

Hi Steven,


The URL API is a browser based api, so if you plan on coding in a language such as java or C# there could be some unexpected results  This is  because these languages usually do not follow URL redirects, which occur on our servers with the URL API.  I'm not too famillar with C# so you may have to correct me,  but it looks like this is using server to server communication and not being populated in a browser like you would see with classic asp.  I think that is what may be causing the error in this case.  I would suggest using the XML API to do the attendee registration for server to server communication.  An example is below.




 1
 2
 3<?xml version="1.0" encoding="UTF-8"?>
 4<serv:message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 5         xmlns:serv="http://www.webex.com/schemas/2002/06/service"
 6         xsi:schemaLocation="http://www.webex.com/schemas/2002/06/service
 7         http://www.webex.com/schemas/2002/06/service/service.xsd">
 8
 9        <header>
10           <securityContext>
11            <webExID>{username}</webExID>
12            <password>{password}</password>
13            <siteID>243585</siteID>
14        <partnerID>g0webx!</partnerID>
15           </securityContext>
16        </header>
17
18        <body>
19                <bodyContent xsi:type="java:com.webex.service.binding.attendee.CreateMeetingAttendee">
20        <person>   
21                <name>{full name}</name>   
22                <email>{email}</email>
23            <title>{title}</title>
24            <company>{co}</company>
25            <address>
26                <address1>{a1}</address1>
27                <address2>{a2}</address2>
28                <city>{City}</city>
29                <state>{state}</state>
30                <zipCode>{Zip}</zipCode>
31                <country>{Co}.</country>
32            </address>
33            <phones>
34                <phone>1,123,1234567</phone>
35            </phones>
36            </person>
37        <joinStatus>ACCEPT</joinStatus>
38    <sessionKey>{session key}</sessionKey>
39</bodyContent>
40</body>
41</serv:message>

Hi Steven,
 
I just stumbled on a similar issue we saw with CURL libraries for php.  Try setting a useragent on your webRequest.  I found this out on google.
1
2<pre class="prettyprint">myRequest<code>.UserAgent =
3    "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; " +
4    "Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; " +
5    ".NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30618; " +
6    "InfoPath.2; OfficeLiveConnector.1.3; OfficeLivePatch.0.0)";



Thank you
-Kingsley Lewis
</code></pre>

Kingsley, thanks so much for the quick response. Adding the user agent solved the problem.  Much appreciated!

Create a Cisco account today and gain access across all Cisco Collaboration Developer sites.

 

Follow the WebEx Developer program on Twitter for the latest industry and WebEx Meetings related information.