Skip to content

💢 A serverless endpoint (via Netlify Functions) to allow programmatic deployment of event description pages in Eventpop.

Notifications You must be signed in to change notification settings

dtinth/event-popper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

event-popper

A Node.js package and a deployable REST API to update Eventpop event description programmatically.

This can be useful for, e.g. continuously deploying an Eventpop description page from a Git repository. For example, global diversity CFP day (Bangkok 2019)’s Eventpop page was generated using React and continuously deployed using GitLab CI.

Disclaimer

This project is not affiliated with or endorsed by Eventpop. I just kinda reverse-engineered the HTTP requests to make it easier for developers (and outside contributors) to update the event description page, even if they don’t have access to Eventpop’s organizer system. Do not abuse, and USE IT AT YOUR OWN RISK. No support is provided, although contributions are welcome.

Preparation

To use this you need to find your organizer ID, event ID and session ID.

  1. Sign in to Eventpop organizer account and go to an event dashboard. You should have the URL in this form:

    https://www.eventpop.me/organizers/<organizerId>/events/<eventId>-*
    
  2. Open your dev tools and extract the cookie called _stampmein_session from your browser. This is your session ID. Protect this ID as anyone who has it can impersonate you!

REST API

Using a REST API is a useful and more secure method that offers protection of your session ID.

If your session ID fell into a wrong hand, it can be used to do anything to every event that you have access to. It can also be used to buy tickets on your behalf. This REST API only allows updating the description of a single event using an API key, hiding your session ID.

  1. Deploy the API to Netlify by clicking this button:

    Deploy to Netlify

    In Configure your site step, enter:

    • API Key — put in some random string here to protect the endpoint. You need this API key to call it. For example: 4122c643d4fc3af51fd9e42b6d59e6a9412bc0bd
    • Eventpop Organizer ID — obtain from organizer URL [optional]
    • Eventpop Event ID — obtain from organizer URL [optional]
    • Eventpop Session ID — obtain this from the browser cookie named _stampmein_session
  2. Once deployed, you can call the API. Here’s an example using HTTPie:

    • Update event on the configured event — just pass in the API key normally.

      http post https://______.netlify.com/.netlify/functions/updateEventDescription \
        apiKey=4122c643d4fc3af51fd9e42b6d59e6a9412bc0bd \
        description=TEST
      

      Use this method if you plan to use event-popper with just a single event.

    • Update event on a specific event — generate a HS256 JWT with eventId claim use the API_KEY as a secret.

      Then use the resulting JWT as an apiKey:

      http post https://______.netlify.com/.netlify/functions/updateEventDescription \
        apiKey=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJldmVudElkIjoiMTIzNCJ9.y3a5Dik9vLuNxIkyMRGUWIogELckfgLhT-k5GVE5Xuo \
        description=TEST
      

      Use this method if you plan to use event-popper with multiple events.

  3. After a while the session may expire. You need to go to Netlify’s project Settings → Build & deploy → Build environment variables → EVENTPOP_SESSION_ID and replace it with a new session ID.

Node.js API

Note: This module is not published to npm yet.

updateEventDescription(html, config)

Updates an event’s description.

config

An object with 3 properties:

  • organizerId (number) your organization ID
  • eventId (number) your event ID
  • sessionId (string) your event pop organizer session ID, get from cookie named _stampmein_session

About

💢 A serverless endpoint (via Netlify Functions) to allow programmatic deployment of event description pages in Eventpop.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published