URI/Hyperlink to Bot created using Google Chat API - hangouts-chat

We would like to add a hyperlink in our intranet which when clicked will open google chat conversation with the specified bot developed using Google Chat API.
When creating a chatbot via https://console.developers.google.com/apis/api/chat.googleapis.com/hangouts-chat?project=xxxxxxxx, the only identifying information about the bot appears to be an App ID (Project Number) and the Bot name.
As of 2020 version of Google Chat, there appears to be no documentation on how to create a direct URI to a user or bot ID) say something like https://chat.google.com/users/XXXXXXXXX where XXXXXXXX is the Bot ID
An inspection of the Google Chat Web Widget (https://chat.google.com) roster/contact list when communicating with the bot suggests that bot identifiers are of the form user/bot/114553095703997684XXX or user/114553095703997684XXX where 114553095703997684XXX is the App Id referenced earlier.
How can we programmatically construct a direct URI to the chat bot given its App ID or Name?

There is currently no method to create a URL that opens a space with a user or bot.
To get a list of spaces you would need to already be part of one.
I would suggest creating a Feature Request if you have not yet. Create an Issue and submit it as a Feature Request.

Related

How to add bot to coversation in Circuit sandbox?

I had created bot app using Circuit SDK and got a sandbox in circuitsandbox.net. To create a bot application I went to "Manage Applications" -> "Custom Apps" and created a bot app. It works great but only way to add bot to conversation I found is to type his full mail in "Add Conversation" menu. Is it possible to found him like common user (searching by his name)?
Bots can be added via email as you noted, and not by its name.
But the new way to add bots to conversations is via the sidebar. This will be available very shortly, probably in a week or two.

Direct link to Google Chat DM

I'm unable to generate a direct link to Google Chat DM. We'd like to link Google Chat DMs to peoples profiles in our organisation.
I've tried to use the users Google ID to generate the link, for example https://chat.google.com/dm/123455 but that redirects nowhere.
I'd expect that there is a way to generate a direct link, either by using users primary email, google ID or to list users DMs through an API call.
Retrieving the "user chat ID" does not seems possible with the existing API.
I have created a new feature request, for the Google Hangouts Chat API (or People API for that matter), to expose this information : https://issuetracker.google.com/issues/134526655
As a workaround, you can use the People API to retrieve the Gaia ID of a user, and then open the a Google Hangouts conversation with the appropriate URL.
Quoting my answer to "Create direct link to Google Hangouts chat" :
you'll need to know that person's Gaia ID (an internal ID used by Google).
I have added a detailed answer to an existing stackoverflow question in which I describe how to retrieve the Gaia ID using the People API.
TL;DR: Request metadata in the personFields, by using people.connections.list resources for your contacts, or the people/get resource for yourself.
Once you've got someone's Gaia ID, it's pretty straightforward to create the correct URL to start a Hangout with them. Simply replace 1XXXXXXXXXXXX below with that user's Gaia ID:
https://hangouts.google.com/chat/person/1XXXXXXXXXXXX

How to pass user authentication through jitsi-meet external API

I am building chat capability in my web application. I am using jitsi as our chat server. There can be 2-4 user in a video chat session. These session will be locked. Web application will initiate the chat and will control who can join the chat room.
I am trying to embed jitsi meet inside an web page using jitsi-meet
external API listed here
https://github.com/jitsi/jitsi-meet/blob/master/doc/api.md .
Our jitsi-meet is not open to public and protected with XMPP
authentication. How can I pass the authentication information through
jitsi-meet API?
I also want to lock the conference room with password. Does jitsi-meet API
have this option?
I am new to this domain. So if you know a better solution please suggest.
Yes there is:
api.executeCommand('password', 'The Password');
Best way I am using with a php/mysql app is generating a room with a random name (usually complex) from the 1st user (the caller), protecting that room with a password and sending the rest of the users a message through the app so that they can connect to the same room with the first.
This way the first user is the end point and the rest connect to the room the first user made.
You should check the other users are online at the time the room is created. The only parameter is the room name which must at all times be unique. Maybe count participants after you enter. When the last user leaves the room, the room gets destroyed. So the users hold the room.
You can also send a mail instead of an internal message.
You need to add JWT token-based authentication in jitsi then you need to generate JWT token & pass it through Jitsi's external API, in this way:
const options = {
...
jwt: '<jwt_token>',
...
};
const api = new JitsiMeetExternalAPI(domain, options);
for more detail, you should checkout Jitsi's iframe docs

Live chat on website using QuickBlox API

We want to develop website live chat widget using QuickBlox Chaa API.
1) In such widget user need not to login and just start chatting. Can we create one generic user that can be used for all chat sessions ?
2) Second requirement is store chat conversation , is there a way to store chat session there a way to get chat session text. Can we hook into it ?
Please tell us if its possible or not.
1) You have to register on quickblox.com. After that, create your project for an your application. Get tokens and keys to access your application. And you will have one primary user to work with QB and its modules.
2) You do not have to ask the user registration. Just give them names for a chat. If you want to use the source code of the widget ChattAR, just remove the registration code. Allow the user to enter a user name by which he enters.
3) Keep the message history you can in a module "Custom objects". This module is a flexible tool, you can create any number of data fields, and select one for each type of data you need.
Also, you can save any files (text etc.) in "Content" module for getting chat session text.

soundcloud authentication for server-side code (no app!)

I would like my server-side code to upload tracks to soundcloud in its own name, then later it will retrieve comments, favourites and listener counts. I do not want to do this on behalf of an app user - for there is no app! Previous questions here on stackoverflow§ (there is no "me too" button) and the API docs seem to suggest I cannot do this. Am I correct?
§ Can track belong to the application and not individual users?
This is called "Authenticating without the SoundCloud Connect Screen" in the API docs:
http://developers.soundcloud.com/docs/api/guide#user-credentials
An "app" in this case is a program that wants to access the Soundcloud API. You register them here:
http://soundcloud.com/you/apps/
Normally you would make a unique username, and register the app to that user. Then, the code logs in as that user to authenticate.