Is it possible to have the user's name included in responses from the Yammer messages API?

sharepoint.stackexchange https://sharepoint.stackexchange.com/questions/232159

  •  07-01-2021
  •  | 
  •  

Вопрос

When making requests to the Yammer API and returning messages from a feed, the only information about the poster is their ID.

Is it possible to have other information about the user included as well? eg. name Or does this require a separate request to return the user details.

In some other services you can include a parameter that specifies the data fields to be returned, allowing access to data that isn't there by default. This isn't mentioned in the yammer REST API documentation as far as I can see.

Это было полезно?

Решение

Have you looked at the actual returned JSON? There is a "references" array that maps user IDs to names. You don't need to make another call but you do have to do some JSON parsing to get to the name.

Try it yourself: https://developer.yammer.com/docs/messagesjson (you can leave the older_than and newer_than params blank)

Лицензировано под: CC-BY-SA с атрибуция
Не связан с sharepoint.stackexchange
scroll top