PowerShell module to interact with the Meetup.com API
Contributions are welcome by using pull request and issues.
- Install the module
- Configure connection
- Authentication
- Get Meetup Group Information
- Get Meetup Group's events Information
- Create Meetup Event
- API Permission scopes
- Resources
Install the module from the PowerShell Gallery.
Install-Module -Name MeetupPS
Follow the following steps to request a Oauth Key/Secret. Fortunately you only need to do this once.
Register a new Oauth Consumer on the Meetup API Oauth Consumer portal
Consumer Name
Provide a name for your Oauth ConsumerApplication Website
Here I usedhttps://github.com/lazywinadmin/MeetupPS
Redirect URI
Here I usedhttps://github.com/lazywinadmin/MeetupPS
- Agree with terms
Once the Oauth Consumer is created, copy the Key and the Secret. This will be used to authenticate against the API
# Connect against Meetup.com API
$Key = '<Your Oauth Consumer Key>'
$Secret = '<Your Oauth Consumer Secret>'
Set-MeetupConfiguration -ClientID $Key -Secret $Secret
Note: This will leverage two private functions of the module:
Get-OauthCode
Get-OauthAccessToken
This will then prompt you to connect to Meetup.
Retrieve a Meetup group information
Get-MeetupGroup -Groupname FrenchPSUG
Retrieve upcoming event(s) for a Meetup group
Get-MeetupEvent -Groupname FrenchPSUG -status upcoming
Retrieve past event(s) for a Meetup group
Get-MeetupEvent -GroupName FrenchPSUG -status past -page 2
Get-MeetupEvent -GroupName FrenchPSUG -status past |
Format-List -property Name,local_date,link, yes_rsvp_count
New-MeetupEvent `
-GroupName FrenchPSUG `
-Title 'New Event from MeetupPS' `
-Time '2018/06/01 3:00pm' `
-Description "PowerShell WorkShop<br><br>In this session we'll talk about ..." `
-PublishStatus draft
Here is the event created in Meetup
The API permission scopes are set when the authentication occur in Get-OAuthAccessToken
.
Currently it is requesting the following permission scopes: basic
,reporting
, event_management
More permission scopes are available here: https://www.meetup.com/meetup_api/auth/#oauth2-scopes
scope | permission |
---|---|
ageless | Replaces the one hour expiry time from oauth2 tokens with a limit of up to two weeks |
basic | Access to basic Meetup group info and creating and editing Events and RSVP's, posting photos in version 2 API's and below |
event_management | Allows the authorized application to create and make modifications to events in your Meetup groups on your behalf |
group_edit | Allows the authorized application to edit the settings of groups you organize on your behalf |
group_content_edit | Allows the authorized application to create, modify and delete group content on your behalf |
group_join | Allows the authorized application to join new Meetup groups on your behalf |
messaging | Enables Member to Member messaging (this is now deprecated) |
profile_edit | Allows the authorized application to edit your profile information on your behalf |
reporting | Allows the authorized application to block and unblock other members and submit abuse reports on your behalf |
rsvp | Allows the authorized application to RSVP you to events on your behalf |
You can take a look a the header passed to the API here:
$Headers = @{
'X-OAuth-Scopes' = "basic", "reporting", "event_management"
'X-Accepted-OAuth-Scopes' = "basic", "reporting", "event_management"
}
See this line: Header of Get-OauthAccessToken