How to identify an user with specific information like unique id or reference number in ejabberd API for chat?
I want to chat with someone then user has some information except name which is unique for that specific user. so we can identify the user in chat based on that?
on register user while calling /api/register API, there is no any unique response which is useful to make chat with another user
Even, /api/registered_users given only name of all the registered users, not any unique information
So, what is the solution?
any other APIs is there for the same or what?
A user (that may be a person, or a machine, or an animal) can register an account in ejabberd (or any other server). That account is identified by the account username and host, for example tom#example.com.
The user uses an account, and the account is identified by the account username and host.
There is nothing else. What else could there be?
Related
I am trying to build a chatbot that will invite a user in a room where the Bot already is, but not yet the user.
User wants to join Room A
User DM the Bot and ask "invite me to Room A"
Bot, already in room A, mentions User
User is pulled in the room.
Currently, my bot can start a thread and mention a user, but the mention will work (showing #Username) only if Username is already in the room.
If Username is not in the room, it will show <users/1234....>.
Is there a way to do that?
Or in general, can a bot invite a user in a room?
Short answer: No.
Explanation: If you refer to Bot access to user data you'll find that -
In order to operate in a useful way, a bot needs to know who is invoking it, and how to address that person. Beyond this basic identity data, bots do not have access to user data unless granted explicitly by the user:
By default, bots can only read the basic identity of users that invoke them. This information includes the user's display name, user ID, email address, and avatar image.
If a bot needs to access other data to do its job, it can prompt the user to grant it additional access.
Hope this helps!
Is it possible to retrieve the list of users in a Google Apps Domain with a non-admin account?
Non-admin users can call users.list(viewType=domain_public) which offers the same amount of details that the users see in the domain contacts directory.
Depends on what you think an admin account is.
Long ago the user roles were just "regular" and "admin". Now you can choose from a fine-grained set of permissions and define a role name for them. "Superadmin" is now a built-in role that has every permission possible.
So, if you define a role which can retrieve the user list and assign it to a user I wouldn't call it an admin account.
You need to be a true admin to do that, though :)
As a complement to the other (excellent) answer, what I do in our domain is to create a full list of domain users in a spreadsheet with all necessary informations and run a script every night that updates the spreadsheet automatically. When I make a change (add or remove user) I can run the script manually to avoid temporary differences.
This script runs as "me" but any domain user has access to the list (I invite them to this shared doc when I create their account so it shows up in their drive/shared with me folder). With this solution I don't need to give special rights to any users.
I am creating an iOS App which the user will be able to login to via his account with our website (internal), or via Facebook or Twitter.
What I would like to know is how should I manage the database in order to verify his Facebook / Twitter account with his internal account on my website?
I.e When the user logs in via his internal account, I just run a simple authentication check to see if his username and password are valid. However with Facebook and Twitter, I obviously can't do this as I don't have access to the user's password.
Thanks in advanced.
my suggestion is that you would create a new table for each of the login types and connect it to your users/members table.
for example - for facebook login you would have a facebook_users table to hold the user's data (such as name, pic and most important - fbid)
than add a column named facebook_user_id to your existing members table.
in order to get the logged user from facebook you don't need to access his password... you should use the Facebook JS SDK and specifically the FB.getLoginStatus and FB.login function...
offcourse my suggestion is only one of many applicable ways to accomplish the task
Save fbid instead of fb-login user_name (you can keep both) of the user in your internal login table - A unique mapping exists (I'm sure something similar exists for twitter as well). Why do you need fb password for it?
Moreover, you run the check on internal table to authenticate user account, but when using login from fb or twitter, isn't the user already authenticated?
I know of the Windows.System.UserProfile.UserInformation class to retrieve first and last names. Is there an API to retrieve a persistent ID of the currently logged-in user? I want to roam certain user settings, but I'd hate for users to login to my app after they've already logged into their OS.
All I need is an ID that is unique to the Windows Live account of the user.
This really depends on what you want to do. If you don't want the user score to roam then why not on first load add a guid to identify the user/device combo and return that to the server?
This would also mean you weren't storing personally identifiable information on the server which a user might not expect.
So I am creating a website that basically allows user to sign up using their facebook account/facebook connect and just a traditional sign up (username, password). Now currently my table looks like this:
uid, username, password, email
I was thinking of how can I change this table structure to incorporate the facebook account connect as it doesn't have any username or password in it, should I just store the email and leave the username and password blank? How do other sites that have such login structure save this information?
You'll really want to store the facebook_id as well, for which I recommend using a bigint.
You might also want to add a status column that indicates whether this user account was created via email address or facebook_id, so that at login time you know which to check. Alternately, you could just check the one that you have credentials for.
This is a fairly open ended question, and the answers depend on what your trying to accomplish, and the use cases you're trying to address. Some general thoughts/suggestions: You should also store the Facebook ID as a separate column. You can leave the username blank, as the Facebook ID can uniquely identify the user, or you can use the email as the username. If you use only Facebook connect, you don't need the password since you can use the JS SDK to make sure the user has a valid Facebook login session.