Created
February 5, 2019 12:25
-
-
Save jcallaghan/eb467ad0d6810a7410aabb376c28fd39 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Yammer app developer token | |
$token = "" | |
# Base Yammer API url | |
$yammerBaseUrl = "https://www.yammer.com/api/v1" | |
# Reference - Yammer Group | |
#$createGroupUri = "https://www.yammer.com/api/v1/groups.json?name=Example&private=True" | |
function Get-BaererToken() { | |
$headers = @{ Authorization=("Bearer " + $token) } | |
return $headers | |
} | |
# Get groups basic | |
$groupsApi = "$($yammerBaseUrl)/groups.json?page=1" | |
$groups = (Invoke-WebRequest -Uri $groupsApi -Method Get -Headers $headers).content | ConvertFrom-Json | |
$groups | select id, name | ft |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment