Skip to content

Instantly share code, notes, and snippets.

@lazywinadmin
Created April 11, 2018 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lazywinadmin/781a5d65c890bb8e1d73a2001f05417e to your computer and use it in GitHub Desktop.
Save lazywinadmin/781a5d65c890bb8e1d73a2001f05417e to your computer and use it in GitHub Desktop.
$MeetupSecretKey = '<My API Key>'
# POST
Invoke-RestMethod -Uri "https://api.meetup.com/2/events?key=$script:MeetupSecretKey&sign=true&group_urlname=FrenchPSUG&name=testevent" -Method post
#Invoke-RestMethod : The remote server returned an error: (405) Method Not Allowed.
# Using a Session
Invoke-RestMethod -Uri "https://api.meetup.com/2/events?key=$script:MeetupSecretKey&sign=true&group_urlname=FrenchPSUG&name=testevent" -SessionVariable aa
#Works
# Signed_url is available in $aa.meta.signed_url
Invoke-RestMethod -Uri "https://api.meetup.com/2/events?key=$script:MeetupSecretKey&sign=true&group_urlname=FrenchPSUG&name=testevent" -Method post -WebSession $aa
#Invoke-RestMethod : The remote server returned an error: (405) Method Not Allowed.
Invoke-RestMethod -Uri "https://api.meetup.com/2/events?group_urlname=FrenchPSUG&name=testevent" -Method post -WebSession $aa
#Invoke-RestMethod : The remote server returned an error: (405) Method Not Allowed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment