0

I need some help in retrieving the event id from the event_new PHP API method. I can see that the URL method works well by returning an XML file containing the new ID, however the response I get from the PHP API method is simply 'NULL'.

The documentation says that both the XML and URL methods return the new event ID, can anyone offer some assistance on what I need to do?

Cheers Paul

  • You're much more likely to get support from eventbrite themselves: http://help.eventbrite.com/customer/en_us/portal/articles If you want help on SO, you'll need to include some code and maybe a sample API response. – Bailey Parker Jul 23 '12 at 23:38

1 Answers1

0

I'm not able to reproduce your error. Do you have any sample code to share?

What PHP version are you running?

This test works fine for me:

//PHP API Client Lib is available here: https://github.com/ryanjarvinen/eventbrite.php 
include "Eventbrite.php";
//Authorization tokens are outlined here:
// http://developer.eventbrite.com/doc/authorization/
$eb = new Eventbrite(array('app_key'=>'YOUR_APPLICATION_KEY','user_key'=>'YOUR_USER_KEY'));
try{
    //Docs on how to use the API's event_new method are located here:
    // http://developer.eventbrite.com/doc/events/event_new/
    $response = $eb->event_new(array('title'=>'test event_new','start_date'=>'2012-12-12 12:00:00','end_date'=>'2012-12-12 12:12:12'));
    print "The new event_id is: {$response->process->id}";
}catch( Exception $e){
    var_dump($e);
}

There are a few more PHP-specific usage notes available on github.

Most of the general information about authentication tokens, as well as specifics on input and output parameters per API method, should be available on http://developer.eventbrite.com/

ʀɣαɳĵ
  • 1,992
  • 1
  • 15
  • 20
  • Hi Ryan, Thanks that works perfectly! I didn't see this code on the Eventbrite developer site so I modified the Event Update file to try and achieve the outcome that your code does, but mine didn't work. Thanks again – user1547102 Jul 31 '12 at 03:02