Adding OAuth2 support to your Meetup API Custom Connector for Azure Logic Apps

Published on
Reading time
Authors

As of February 1, 2022, the Meetup REST API has been retired and no longer functions. I am leaving this post up for learning purposes, but the API Custom Connector no longer works. You can find out how I solved the shift from REST to GraphQL in my April 2022 post.

In May 2019 I wrote a post on how you can integrate meetup announcements into your Microsoft Teams environment by using Azure Logic Apps.

Up until June 2020 the anonymous Meetup API I previously blogged about worked quite happily and then Meetup decided to enforce consumption of their API via clients using OAuth2 which broke the integration.

The contents of my previous post are still valid - the custom connector works just fine - but we need to add OAuth2 support for our Logic App to work. In this post I'll walk through what is required.

Setup Meetup OAuth Consumer

The first thing you'll need to do is setup an OAuth Consumer on the Meetup API site at: https://secure.meetup.com/meetup_api/oauth_consumers/

You'll need to have a paid Meetup subscription to do this (Pro level is not required at time of writing).

Give the Consumer a meaningful name (below it is "Teams Meetup Bridge") and then enter a valid website name.

The Redirect URI can be filled in with a placeholder to start up with. The URI you see below is what I set after I had integrated my Logic App and will change depending on which Azure region your Logic App resides in.

Meetup OAuth Consumer

Now we have this setup we need to modify our calling Custom Connector and Azure Logic App to use OAuth.

Modify Connector and Logic App

Note that this process will be easier if you have your Meetup user logged in in the same browser session you use to setup the Azure Logic App.

Custom Connector

One of the options for Custom Connectors is to define the authentication scheme that will be required when the Connector is used in a Logic App.

In our case we want to select "OAuth 2.0" and then "Generic Oauth 2" which provides a set of fields to configure.

You can get the Authorize and Token URLs from meetup. The "Client ID" is your Meetup OAuth Consumer Key and the "Client secret" is the Meetup OAuth Consumer secret.

The Refresh URL is required - you can re-use the Token URL (it will be blank if you edit the Connector again). Leave 'Scope' blank. The Redirect URL will be generated once you save the Connector - you can copy it and update the Meetup OAuth Consumer's details appropriately.

Custom Connector OAuth Configuration

Logic App

If you have been using the old anonymous Connector with a Logic App then you will need to update the Logic App to use the new Connector. Additionally you will need to authorise the connection now that it requires OAuth.

If you create a new Custom Connector and add it to the Logic App you will automatically be prompted to authorise the connection, otherwise if you open the Logic App that uses a Connector that you've simply updated to use OAuth then the Logic App will display an error telling you the connection is unauthorised and you will need to go through the authorisation process.

This is where being logged into your Meetup account in the same browser you're editing the Logic App with will save you some time - the OAuth grant dialog will pop up temporarily and then disappear as you are already authenticated with Meetup!

Once all these steps are done and you've saved your Logic App then you will find it continues to work as it did previously!

Happy Days 😎