How may I detect the user id of an authenticated user of a browser? I am in need of creating some API or find some browser-based way to find the user id of the authenticated user in a browser. Any easy way for it?
If you are developer then you should know the answer. We can not answer on behalf of others developers. It depends on a person who is going to program your use case.
Would it be possible to create my own API to find the logged-in user id?
Well if you are on same session and browser server where OSSN is installed can get user id like
$id = ossn_loggedin_user()->guid;
But if you asking is there any way to find loggedin user id using API then it is not possible :)
You are planning to allow user to post using API for user that is loggedin you need to use user_auth API and some how you need to store in your API cookie somewhere securely if user is loggedin via API and its success.
I am building a new image tool under the subdomain (c.web.com) of my social media (web.com). c.web.com must be able to post the image created via the tool to social media using the web service API only when any user of the browser is authenticated. To post it using API, I need the user id of the authenticated user.
Perhaps you can give a little more insight on the workflow you have in mind?
I mean, the server knows best if a user IS authenticated or not and would deliver less/more html/script accordingly.
So why should the browser have to 'know' that, too?
Due to the many requests in the past for additonal features and components we have decided to develope a premium version. Features like Hashtags, Videos, Polls, Events, Stories, Link Preview, etc included in it.
$199 (Life Time)