Join as MeraEvents Affiliate and earn up to 4% commission on your conversions Become an Affiliate
X
Introduction

MeraEvents.com is a leading technology & solution platform that serves event organisers for event ticketing, registration, merchandise selling, and event management.

Where to find API Access?

After login to MeraEvents http://www.meraevents.com/login go to ' Developers' (Under login user name).

What are the access rights?

As of now, we offer both read and write access to MeraEvents account holder for their data only. As an meraevent apps developer, we provide OAuth2 authentication, using which MeraEvents user can give access to your app for their data. We ensure our user’s data is 100% safe and it is only given access to those applications they decide to give access via OAuth2.

Get Started

MeraEvents has a modular architecture with several application serving respective services, e.g. the account application works like a gatekeeper for the account & authentication whereas event management application provide services for ticketing, registration, donation and rsvp event & management. Therefore your API use will have different MeraEvents URL depending on the services you are accessing.

Create your account

MeraEvents API is open to all. To create your account, go to http://www.meraevents.com/signup.

 

 

Get API Access

After login to MeraEvents http://www.meraevents.com/Login, go to Developer tab (userName/Developers,Logout). Meraevents supports OAuth2 specification to enable access to APIs. MeraEvents provides 2 ways to authenticate & access.

User Access

Mera Events users can use this approach to directly connect and use MeraEvents API.You need ‘Access Token”, get your access token from 'Developers'

App Access

As an Apps developer or user wants to access API, you have to first register your application with MeraEvents. Go to ‘Developers’ page and create an application as shown in the following diagram.

You will get Application Client Id and Client secret. Save it for future use

Application Integration

The following steps explain how to integrate MeraEvents OAuth2 with your application.

1. User Authorization (Get User authorize code)

In your application, show a button called 'Login with MeraEvents' and send the request to 'http://www.meraevents.com/developers/client_authorize.php?&response_type=code&client_id=yourAppClientId&redirect_url=yourRedirectURL' The above request is to authorize user or to get user’s authorization code.

After user’s successful authorization, it will return authorize code to your registered callback URL.

2.Get access token for authorized code.

To get the access token for the authorize code. You have to send POST request to the URL : 'http://www.meraevents.com/developers/token.php' with following parameters.

  • client_id : App client id
  • client_secret: app client secret
  • grant_type : authorization_code
  • code : authorization code

Note: only POST method is allowed.

Example:
$request_string = 'client_id=appClientId&client_secret=appClientSecret&grant_type=authorization_code&code=userAuthorizeCode'; $url= http://www.meraevents.com/developers/token.php;

$ch= curl_init($url) ;
curl_setopt($ch, CURLOPT_POSTFIELDS,$request_string);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT,30);
curl_setopt($ch, CURLOPT_POST, 1);
$response = curl_exec($ch);
$response_data= json_decode(urldecode($response),true);

The above $response_data contains the token. With the token, you can now call any MeraEvents API methods. The token will be valid for 3 months; in future following the same process, user could give you access to their MeraEvents data.

To access MeraEvents API you need access token.

NOTE : Additional request headers are required when using access_tokens to use MeraEvents API: “access_token: YOUR_ACCESS_TOKEN_HERE“.