Yammer REST API Post Message issue - yammer

I am posting messages to Yammer from my java application using
https://www.yammer.com/api/v1/messages.json API and I am facing issue with the message that is displayed on Yammer. All the message shows " from Yammer Developer Center" instead of the sender name. Please advise on how we can change this to actual user name
http://i.stack.imgur.com/g4rsw.png

This is intended. That part of the UI shows the application that the user posted a message from.
For example, it could say from Android.
The sender name is at the top of the post.

Related

Slack API: Interactivity components not do not work posting message as real user

I'm trying to include block kit interactive components such as textboxes and buttons in a slack message that is sent via the API.
The buttons work perfectly when the message is sent by the bot and not impersonates a real user. But when posting as a user (I.E. Setting set_user as true when calling the chat.postMessage API endpoint), the buttons show up but do not work.
It seems that slack does not make an HTTP request to the "Interactivity request URL" specified in the Slack App's configuration.
Has anyone managed to get it to work?
Thanks
Do you mean to say the interactivity is not working when you use the as_user parameter on chat.postMessage? If that's the case then the issue is that this parameter, as_user is not supported for newer apps. In other words it's a legacy parameter that shouldn't be used. If you want your app to post as another user you will have to add the chat:write.customize scope. See the documentation about authorship.

Google Meet integration api (like Hangouts app for Slack)

I want to utilise Google Meet api, which is used in Hangouts integration for Slack, description follows
TL;DR:
Links such as https://meet.google.com/new?gid=123&gd=qwe987 can be generated, so a modal is shown which can ask user's confirmation and then some request is sent from user's browser (where the Google Meet page is opened) to some endpoint (probably it is determined from gid which seems to be google application id). Is there a way to configure my application to have a webhook, so I can generate these custom links?
There's Google+ Hangouts app for Slack. Here's how it works (after you add the app in your workspace):
you send /hangout command in any Slack channel
slackbot sends an "Only visible to you" message in this channel with a link to start a new hangout. it looks smth like this (I changed data in the link): https://meet.google.com/new?gid=691521906844&gd=THTJ30X6W%7CU01113BD13M%7CD01113BDB5Z%7Csuren%7C%7C1846381238693%7C1%7CB01QFGG5GJF%7CE1MDm4DWcuVa0RbN5ZT9o5KF
when you visit the link, a new meeting is started instantly, and the page shows modal with text "To bring others into this video call, post a link it to your Slack channel" with buttons 'Cancel' and 'Post'.
when you click 'Post', a new message is sent to the Slack channel, where the command was sent. Text is "#Suren Khorenyan has started a Google+ Hangout and would like you to join. Join Hangout." and contains a link to the meet, which was created previously
How can I utilise this integration for another app, like Mattermost (or anything else like Telegram chats via bots)?
As I see, data in the url slightly changes. Probably it's payload for Google Meet to trigger Slack to send a message with link to the channel.
gid seems to be something like google app id
gd seems to be something like google data. If I url-decode it, it becomes THTJ30X6W|U01113BD13M|D01113BDB5Z|suren||1846381238693|1|B01QFGG5GJF|E1MDm4DWcuVa0RbN5ZT9o5KF. This is some kind of payload, separated by pipes (obviously), but I don't know what any part of this means (suren is my username in the Slack workspace, probably this is used for creating an invitation message).
When I click Post, this happens:
a new POST request to https://hooks.slack.com/services/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 is sent with form-data
hangout_id: 1812381238693
hangout_url: https://meet.google.com//abc-iuqx-def
a new message is posted to the Slack channel
Google meet somehow knows where to post back! Is this configured at the Google application (application id is provided via gid)? How can I configure my application for such behaviour? Where can I setup webhook url?
If we breakdown the request, we can see that url contains some parts of the gd payload:
THTJ27X6W - this is the first part of the gd payload
B01ABCD5GJF - last but one
E1MDm4DWcuVa0RbK5ZT9o5KD - the last part of the gd payload
and form-data contains:
hangout_id - this is in the gd payload after my name
hangout_url - obviously, this is the url for the new created meeting
How can I change it for my needs?
I created a new application at Google APIs dashboard (here console.developers.google.com/apis), but can't find any docs for this integration. There's Google+ Hangouts API in API Library, but it says Apps will continue to function until April 25, 2017..
I tried to approach it from another side:
In the API Library there's Google Calendar. I found mattermost-hangout app on GitHub (had to update it a bit, so it works with updated api). Here's how it works:
oauth2 for authorising at google (single account)
it handles POST request, which is meant to be received from Mattermost (triggered by a slash command),
creates a new calendar event using Google Calendar API (with conference),
takes hangouts url from the response and sends a new message in the Mattermost channel with invitation to join the meeting.
But it has some downsides:
you have to use one account to authorise all event creation events (yeah, it can be upgraded to authorise any number of users, but it'll be inconvenient. why to force anyone to provide access to their Google Account, when Google Meet authorisation just happens in browser, we don't need to create events)
account, used for auth, now has events in his calendar. of course, events can be deleted, but it's not the way.
Is there any documentation on utilising gid and gd params?
Generally, I want to find a way to configure a webhook in my app, so when Google Meet finds my application's ID in the gid query param, it looks at the app's config and sends a request to my app (previously configured endpoint (I assume it works this way)).
Of course there's a chance that it's some kind of internal API and it cannot be used by everyone, but I could not find any information on this.

Event sent to UrlFetchApp using appsscript does not appear in Google Analytics

http://www.google-analytics.com/collect?v=1&tid=UA-XXXXXXX-1&cid=1060320920.1612316285&t=event&ec=transaction&ea=call&el=202102081703_0507-1474-0311&ni=TRUE&ti=offline&ta=&tr=100&tt=0&ts=0&pa =callOrder&pr1id=&pr1nm=product_name&pr1qt=1&pr1pr=100&pr1ca=machine
I am trying to send the above URL to Google Analytics using apps scipt.
When I enter it directly into the URL address bar, an event is sent.
However, if you refer to the existing data (POST method) and send it to apps scipt, the event is not caught in Analytics.
Try to see if you have Exclude spam and bot option checked in View settings. That could be the cause.

Message sent by Microsoft Teams bot is not displayed in the conversation

I have tried to send MS Teams bot message request via rest api:
End point: https://smba.trafficmanager.net/ca/apis/v3/conversations/{conversation id}/activities
{"text":"test","type":"message"}
And got empty response:
{}
The message i sent did not appear in the conversation.
Any idea where i could have misconfigured?
It is possible that trustServiceUrl needs to be run before a message is sent, i can't find equivalent rest api to call.
You definitely do need call trustServiceUrl before sending the message. In addition, you need to have additional properties on your activity, like the destination user or tenant id. Please refer to the documents on this, and good starting places are here and here.

Posting a message from a Yammer app - notifications?

We are posting a message to Yammer from our app about a specific user> Is it possible for the user to receive a notification about this message and if so how do we enforce this?
I've tried including "#username" in the message body but to no avail...
When a user is #mentioned ("at mentioned") in a conversation that thread should appear in the user's inbox. It won't appear in the notifications because that is reserved for specific notifications.
When you #mention the user today is the #username part being correctly linked to their profile? If not you might want to check out my other post on this subject. Once the permalink is used you should see it replaced with the user's profile name, and this is what triggers the connection. It should then appear in the inbox of the #mentioned user, even if they don't follow the conversation in their inbox.

Resources