Share via


Making API Requests

Important

All Yammer APIs support authentication via Entra tokens. We recommend using Entra applications to access the Yammer APIs. Learn more.

Starting July 1, 2025, legacy Yammer application registrations will be restricted in all Viva Engage networks and oAuth2 based authentication will no longer be supported.

With a valid access token, your app can make calls to any Yammer API endpoint by sending the access token as a “Bearer” token in the “Authorization” request header.

GET /api/v1/messages/following.json HTTP/1.1 
Host: www.yammer.com 
Authorization: Bearer abcDefGhi

For more detail on the “Bearer” token refer to: http://tools.ietf.org/html/draft-ietf-oauth-v2-bearer-23

If the access token expires, or the user de-authorizes your app, the API request will return an HTTP 401 with the following error in the body of the response.

{
  "response": {
    "message": "Token not found.",
    "code": 16,
    "stat": "fail"
  }
}

Your app can request a new access token by re-running the appropriate flow if this error occurs.

If you would like your app to receive private content from the REST API you will need to set the Private Content flag ‘on’.

Private content includes the following:

  • Private messages
  • Private groups
  • Messages and files in Private groups
  • Profiles

First, make sure you are using a Verified Admin token to access private content.

Using the VA API credentials, POST a http request to the following endpoint with the raw body 'enabled':true}

https://www.yammer.com/api/v1/supervisor_mode/toggle

The endpoint will return the following body if the activation was successful:

{
"status": "success',
"supervisor_mode": true
}

Tokens acquired through the OAuth authorization flows outlined on in this section are supported in all Yammer network configurations. This is the appropriate option for most developers.

Developers should be aware that if a token is acquired through the preview ADAL-based flow it will work for some endpoints and situations and not others. We are committed to maintaining and improving support for ADAL-based authentication over time. Further updates will be posted to this documentation as improvements are made and Yammer integrates further with Office 365.