Is there any way to get the email of the current logged in user and send that information to another application? - buildfire

I have embedded an iframe in the source code of each person added to my People plugin
I am looking for a way to conditionally render a button based on who the logged-in user is. If the email of the logged-in user matches the email in the iframe's param then the button ('Click here to update Profile') should appear. Otherwise, it is not on the page when the logged-in user views other people.
Buildfire People Plugin
I looked through the public api docs and tried using the /auth/verify_credentials but this is for logging in, this will not return the email of the logged-in user.
I know buildfire SDK has a buildfire.auth.getCurrentUser(callback) function that can be used. I need the callback to send that info to another application.
The app that I created is deployed on netlify and the backend is deployed on heroku.

Related

Service account to send Docusign eSignature requests

I've signed up for a developer account with Docusign. We have about 15 users that access a Windows Forms page from another program where they fill out the proper information and click a button that calls a NET Core Web API which creates an envelope and sends to the signer. Those 15 users don't have accounts in Docusign and don't need them to. I want to use one admin or service account that will send and receive the emails, but I can't figure out how to do this.
I used my name for the developer account and now all my (test) Docusign emails show they are from me and once the signer signs, my email receives the signed documents. I've tried creating another "Admin" account, but I don't see any way to associate that user as an "API User". When I try using that user's GUID as the ImpersonatedUserID, my RequestJWTUserToken request comes back with "consent_required". But, when I go to the link I just get an error with "The client id provided is not registered with Docusign".
Everything in the Web API is working perfectly except for the emails showing they are from me and then the signed docs coming back to my email. This should be an easy thing to change the user, but apparently it's not, or I just can't figure it out.
You were on your way to fix this, but didn't follow through.
Create new user (you did it)
Find the new userId (you did)
Update JRequestJWTUserToken (you did)
Consent error - expected, the new user did not consent.
Obtain consent. You need to have a URL built correctly like this to do this:
https://account-d.docusign.com/oauth/auth?response_type=code&scope=signature%20impersonation&client_id=7c2b8d7e-xxxx-xxxx-xxxx-cda8a50dd73f&redirect_uri=http://example.com/callback/
Once you do 5, you need to log in with the same new user account you created (you may be automatically logged in with your original developer account, so log out) and provide consent.
Then step 4 will work just fine.
https://developers.docusign.com/platform/auth/consent/obtaining-individual-consent/

How do I post as different users in react-activity-feed component using the same token?

Our Use case is Anyone can create a site in our platform bit as Wix lets say. Each Site has its own Community & Chat.
So I used my appId, secret key to create the user session token for the user of the site1 says site-1-user-1 for displaying the community of site1.
I used react-activity-feed components to display the timeline feed of user site-1-user-1 (timeline:site-1-user-1)
I also displayed status update from above the activity feeds using react component. So when I post in this status update form, the activity gets displayed as by site-1-user-1.
How do I post activity as a different user say site-1-user-2 using the same token? I want the timeline feed with status update form to be displayed as a discussion forum where any logged in user can post any topic and see other activities also.
I am able to do this using PHP and getStream SDK.
How is it possible by using the react component?
Stream restricts actions user is able to perform when using client-side tokens:
User is able to read any feed
User is able to make feeds with her user-id follow any feed
User is able to post to feeds with her user-id
Client side tokens can only be used to perform the actions as the user the token was created for.
If you need to be able to impersonate other users or post contents for users to feeds they have no access to you will have to user server-side stream api

How can we pass some parameter in DialogFlow Web demo iframe

I have created 1 Web demo DialogFlow agent and i added the Iframe in my site. Now my requirement is that when logged-in user see this Agent window, automatically logged-in user's name should display - "Hi Monty".
I want to pass username and password silently to dialog flow from my website and then i will authenticate it with the help of Webhook and will fetch the profile and then will display the user's name in Agent.
Please let me know, how can i do this?

Single Sign on for DocuSign

We have an application that we currently open the DocuSign console in an IFrame. The issue is that currently we are having to open a new tab, log on to DocuSign and then the user can see the console in the Iframe with documents. What is the most common way people are using to automatically logon to DocuSign through their applications ? I see an SSO documentation but it says that it looks at the persons email domain to authenticate them.... our users will have many different email domains.
Your application can use the API to get the console view for the user. The session will correspond to the user credentials in your API request and will skip the logon step. From that API call you get a URL back that you can embed in the iFrame. E.g.: POST to https://demo.docusign.net/restapi/v2/accounts/55555/views/console and you get back a URL like this:
{
"url": "https://demo.docusign.net/Member/StartInSession.aspx?StartConsole=1&t=00000000-0000-0000-0000-000000000000&accountid=00000000-0000-0000-0000-000000000000"
}
Edit: If you need the "sending view" (sometimes called "the tagger") for an envelope then you can POST using a URL like this:
https://{server}/restapi/{apiVersion}/accounts/{accountId}/envelopes/{envelopeId}/views/sender
e.g.
https://demo.docusign.net/restapi/v2/accounts/12345/envelopes/f6e755d3-bbcf-44e5-b276-8ae626f97220/views/sender

DocuSign REST API, change account's email address? (ie, the users login name)

At my company, we are implementing some parts of DocuSign, and have run across a scenario we believe the REST API does not support.
There are times where user's in our system change email addresses. We want to push this change to DocuSign for the user, without the user ever requiring to log in to DocuSign and manually change their email address via the console. This, of course, changes the username the user authenticates with on the login page of DocuSign.
Is it possible, using the DocuSign REST API, to change a user's email address (which in effect changes their login name do DocuSign)?
The DocuSign system does not support changing the email address through the API (REST or SOAP). This is mainly due to security restrictions - unfortunately your users will need to manually go into the DocuSign Console and go to Preferences to change their email address.
One thing that might make this process a little smoother is to automatically open the Console for your users when they request to change their email address. You can open the Console in an embedded iFrame in your site or app and from there they can change their account info. You would just need the user's credentials (along with the integrator key of the integration) and you can open the console for them.
The third API Walkthrough - Embedded DocuSign Console - illustrates exactly how to do this in 6 different languages (PHP, Java, Javascript, Python, C#, and Objective-C). You just need to make the following call from your environment, with just your accountId in the body of the POST request:
Method
POST
URI
/accounts/{accountId}/views/console
BODY
{
"accountId": "XXXXXX"
}

Resources