sharepoint online – post message with attachments to yammer

Hi I am using console application to upload a document to yammer using Yammer REST API.
https://developer.yammer.com/docs/pending_attachments

For access token I am using developer token generated from a registered app in yammer (https://www.yammer.com/client_applications)

Can you please guide me on how to achieve this functionality or post any useful links

I have tried the following links and it is not working (not getting any response)

https://stackoverflow.com/questions/9823955/yammer-api-attachments-upload

https://stackoverflow.com/questions/17993900/how-to-upload-pending-attachment-to-yammer

Thanks