Using Meetup API to duplicate an event

6/15/2019

My other half and I manage pages for multiple groups on MeetUp.com. A problem we were encountering was that there is no way to copy a meetup from one group to another group. You end up having to spend a lot of time copying and pasting text and images for each group that you wanted to share to. The feature photo alone takes a while to upload and crop correctly. This adds up when you are managing 10+ groups.

Luckily, Meetup has an API that you can use. It is documented at https://www.meetup.com/meetup_api/. To get started, you want to create OATH 2 credentials for your app. You want to setup a key, secret, base website, and redirect URI.

You can implement it with server side or client side code. This example will be for Python console. You will want to get a token from Meetup before you can use it in Python. To get a token, go to your favorite web browser and go to https://secure.meetup.com/oauth2/authorize?client_id=YOURCLIENTID&response_type=token&scope=event_management&redirect_uri=YOURREDIRECTURI . After you authenticate your app, you will find your token appended to the redirect URI. Note, you need the event_managment permission to create an event.

Once you are authenticated, you want to make an API call to the event you want to copy and get all the event details and featured photo. Next, upload the featured photo to an album to the new group. Finally, create an event using the details and the featured photo.

You will need the Requests library. https://3.python-requests.org/ to upload a photo.

Download the Python code