I want to create a post in Yammer via their REST API and attach an image to this post.
In the yammer documentation they say that you have to first upload a file via the uploadSmallFile API, it will returns the id of the file and then you can use this id to attach the file in the post.
Before coding I'm trying to make it works in Postman. When I send the request I got 403 Forbidden, and after reading articles I think it is because the access_token I use doesn't provide the good rights.
Where and how to grab an access_token that permit me to upload a file ?
I found the solution:
If you want to use the uploadSmallFile API you have to grab an Azure Active Directory (AAD) token.
So you have to use the microsoft oauth2 auth-code flow.
And when you provide the
scopeparameter, just usehttps://api.yammer.com/user_impersonationlike this: