Step 3: API Requests

The Yammer REST API enables message posting, feed access, and many other capabilities. It supports both Yammer OAuth 2 (legacy) and Azure Active Directory (AAD) tokens.

Azure Active Directory tokens are recommended over using Yammer OAuth 2 (Legacy) tokens.

Once you have a valid access token, your app can make requests to the Yammer API to push and pull data by sending the access token as a "Bearer" token in the "Authorization" request header.

GET /api/v1/messages/messages.json HTTP/1.1
Authorization: Bearer abcDefGhi

For more detail on the “Bearer” token refer to:

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"

See all the Yammer V1 REST API endpoints here.