Share via


Call Yammer APIs

The Yammer REST API enables you to post messages, access feeds, and perform various other operations programmatically. The API supports authentication using both Yammer OAuth 2.0 (legacy) tokens acquired via impersonation and Microsoft Entra tokens.

Important

Microsoft Entra tokens are recommended. Yammer OAuth 2.0 (legacy) tokens are being retired.

Once you have obtained a valid access token, your application can make requests to the Yammer API by including the token as a "Bearer" token in the Authorization request header.

Example request:

GET /api/v1/messages/messages.json HTTP/1.1
Host: www.yammer.com
Authorization: Bearer {access_token}

For more information about Bearer tokens, see the OAuth 2.0 Bearer Token Usage specification.

If the access token has expired or the user has de-authorized your application, the API will return an HTTP 401 Unauthorized response with the following error in the response body:

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

To learn more about the legacy Viva Engage (Yammer) v1 REST API endpoints, see the API reference.