DocuSign integration using REST API - parameters for process initiator - docusignapi

via the DocuSign REST API we're creating an envelope. The creation is done via a background job from a different system and works fine, but I still would like to add an additional parameter.
And here I struggle. I would like to hand over the original initiator of the process, so that this person could find the envelope in his/her DocuSign Inbox.
Is this possible? I've tried sender, but this does not work or maybe I pass the wrong values?
Or would I have to use a different way, like shared envelopes?
I'm quite new to this topic, so a hint would be very kind. Thanks a lot.
I've tried to add the parameter sender, but I neither get an error nor the expected result.
{
"emailSubject":"envelope for integration",
"status":"created",
"compositetemplates":[
{
"compositetemplateid":"1",
"servertemplates":"",
"inlinetemplates":[],
}
],
"sender":[
{
"email":"myemail#test.de",
"username":"Claudia",
"userid":"b3r2fc59-g34d-256d-v364-23f34ere5f97",
}
],
}

You can do this using JWT.
With JWT you impersonate any user in the account by providing their userId when you authenticate to get an access token.
You do need to provide consent by that user once, but after that - you can do this with your app automatically and the envelope will show as if it was created by the user you want.

Related

Dialogflow - Fulfillment request pay load - How to register the user with user id received in request payload

What are the google/Microsoft(Skype) APIs available in order to register user in my application with the same user id as received in fulfillment request payload to my web hook?
I receive following for skype:
{
"originalDetectIntentRequest":{
"source":"skype",
"payload":{
"user":{
"name":"Sana Zehra",
"id":"29:1I3o3Np8sTLU7YSuhHO-IDuc1SgqMwg-83YwGryAZceE"
}
}
}
}
For Google I receive this:
{
"originalDetectIntentRequest":{
"payload":{
"user":{
"lastSeen":"2019-01-02T07:57:02Z",
"locale":"en-US",
"userId":"ABwppHHxPEyGWY1R26WqV3o5i1w8YNGbAIn5TXd28cre8Eu3iWtPlJEMuSzPWIW1b5u8e94djCv1xvmszegO1Q"
}
}
}
}
I need to register my users with this id as I authenticate if an incoming request is a registered user or not.
You would need to build a flow for registration something that allows you to gather all the required information and register the user at your end, you can then verify if the user is registered by validating them against their id.
A sample article that handles the user registration via chatbot scenario:
https://medium.com/#sage.mcenery/building-a-registration-chatbot-on-aws-with-lex-and-twilio-4a14c15b8725
You can use google helpers in case of assistant which can give you the following additional info about the user:
Display name,
Given name,
Family name,
Coarse device location (zip code and city),
Precise device location (coordinates and street address)
Documentation on the same:
https://developers.google.com/actions/assistant/helpers#built-in_helper_intents
I've never tried this myself though so I'm not too sure about this.
I do not think Skype and Google will give you much info about the user if that's what your looking for but a unique id against the user should do the trick in most cases.
Neither ID has any direct relation to the user's account on that platform.
Furthermore, the userId provided on the Actions on Google platform has been deprecated, and is scheduled to be removed in May 2019.
The suggested way to associate the user's Google account with their session with you is to use Google Sign In for Assistant. With the user's one-time permission, you can then get their Google profile ID and other profile information.

DocuSign ID Check with Embedded signing for documents sent via JAVA SDK

I'm trying to achieve ID Check on embedded signing through an envelope sent via Docusign Java SDK. I am able to make it work through remote signing however, I get the following error on embedded signing.
{
"errorCode": "INVALID_REQUEST_PARAMETER",
"message": "The request contained at least one invalid parameter. The value of AuthenticationMethod is invalid."
}
I'm fully aware of another post on the same topic posted in 2013 (DocuSign ID Check with Embedded signing). The difference here is that I'm not using any document templates but sending the documents in the envelope itself. Based on the comments a bug was logged with bug id 30830 but I can't say whether this was resolved.
Also, I have already added the settings that I know that are required for ID Check.
signer.setRequireIdLookup("true");
recipientViewRequest.setAuthenticationMethod("ID Check $");
Can anyone advise on what I'm missing ?
It's a little hard to tell from your question but from what I gather you might be setting the properties on the wrong request. As you know when creating a remote signing request you can do it through just one API request - Envelopes: create.
For embedded signing you still first create an envelope (with an embedded recipient) but then you need to generate the signing URL by calling EnvelopeViews: createRecipient.
When setting the ID Check authentication for your recipient you still need to assign this in the first request (ie the create envelope call) so that recipient is configured like so:
"recipients": {
"signers": [
{
"idCheckConfigurationName": "ID Check $",
"requireIdLookup": "true",
...
}
]
}
THEN, in the request body of the second call you need to set the authenticationMethod with the same value and provide the other required params to identify the signer.
Please confirm you are following this flow and if so and still stumped then post the actual JSON that you are sending for your requests and we should be able to determine from there.

chrome.identity.LaunchWebAuthFlow: How to implement logout in a web app using oauth2

I am working on some client side web app like a chrome extension that needs access to outlook mail and calendar. I followed the instruction on https://dev.outlook.com/RestGettingStarted and successfully got access and refresh tokens to retrieve data.
However, I cannot find any way of implementing "logout". The basic idea is to let user sign out and login with a different outlook account. In order to do that, I removed cached tokens, requested access tokens in interactive mode. The login window did pop out, but it took any valid email address, didn't let me input password and finally returned tokens for previous account. So I was not able to really use a different account until the old token expired.
Can anyone please tell me if it is possible to send a request to revoke the tokens so people can use a different account? Thanks!
=========================================================
Update:
Actually it is the fault of chrome.identity api. I used chrome.identity.LaunchWebAuthFlow to init the auth flow. It caches user's identity but no way to remove it. So we cannot really "logout" if using this api.
I used two logouts via launchWebAuthFlow - first I called the logout link to my app, then secondly, I called the logout link to Google.
var options = {
'interactive': false,
'url': 'https://localhost:44344/Account/Logout'
}
chrome.identity.launchWebAuthFlow(options, function(redirectUri) {});
options = {
'interactive': false,
'url': 'https://accounts.google.com/logout'
}
chrome.identity.launchWebAuthFlow(options, function(redirectUri) {});

C# MS-CRM 2013 online Plugin To Publish Event On Facebook Page

My solution may not be technically possible. Yet I would like your viewpoint
We have to create a workflow/plugin MS-CRM 2013 which will publish events from CRM to a particular facebook page.
A separate application is not possible.
The problem is, to publish I need Page Access Token.
To get Page Access Token I need User Access Token.
To get User Access Token I need to follow the redirect_uri path where I will get the code in URL string but MS-CRM 2013 as you might be aware does not allow "code" as url string, it will refuse to redirect itself to my callback page, that is my problem.
I am open to suggestions I have used Facebook SDK and simple webrequest.this gives me the App Access Token
dynamic result = obj.Get("oauth/access_token", new
{
client_id = this.fbAppID,
client_secret = this.fbAppSecret,
grant_type = "client_credentials",
scope = "publish_actions,manage_pages,create_event,read_stream,publish_stream,email,read_friendlists,read_insights,read_requests,manage_friendlists,user_about_me,user_activities,user_birthday,user_groups,friends_groups"
});
Now How do I get the user access token from inside MS-CRM 2013 online.
If somebody has done it please do let me know, if you need more clarification I will be happy to provide more code etc.
You need to separate your logic:
Create an HTML/JavaScript WebResource combo that allows a user to link their CRM SystemUser record to Facebook. Build code similar to that below - it'll need additional supporting code to check if the user is already connected to Facebook, etc.
FB.login(function (response) {
if (response.authResponse) {
// user sucessfully logged in
var accessToken = response.authResponse.accessToken;
//TODO: Add logic to save accessToken to CRM SystemUser record.
}
}, { scope: 'email,publish_stream,email,rsvp_event,read_stream,user_likes,user_birthday' });
In your plugin retrieve the FB Access Token, saved in step 1, from the CRM SystemUser record, and use that to instantiate your Facebook connection object:
var obj = new FacebookClient(accessToken);
This is a bunch of work to do to get the access token. And none of the guides are going to clearly explain mixing pure HTML/JS for token retrieval but making the calls from C#, since this is a fairly unusual requirement.

How to get user image through user id in Google plus?

I used to get user image through this URL
https://plus.google.com/s2/photos/profile/(user_id)?sz=150
but now what all I am getting is 404 error or no image. I know google has changed its policies and way it connects and allows other to get information, but I didn't anything to achieve same result as above.
Note: I can't use authenticate thing here since I am showing image of users to other users which are not connected at all.
OR in other way user may be not coming from Google log-in but I need to show other Google users images only.
Any help would be highly appreciated!!!
Edit:
I have checked through people.get method
https://www.googleapis.com/plus/v1/people/11595...3592320?key=AIzaSyCkdmtNN1XDg....EpepOIIs
but I am getting error saying
{
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "accessNotConfigured",
"message": "Access Not Configured. Please use Google Developers Console to activate the API for your project."
}
],
"code": 403,
"message": "Access Not Configured. Please use Google Developers Console to activate the API for your project."
}
}
Edit: I have this already enabled since I am using Google+ log-in already in my site, here I am attaching screenshot:
Earlier I have also the same problem for my site after so much of research and efforts I found solution from my self and i hope that will also work for you and solve your problem:
Old Trick
Google had changed their policy so the old trick for getting the Google profile image will not work now.
e.g https://plus.google.com/s2/photos/profile/(user_id)?sz=150
New Trick
Get Request:
https://www.googleapis.com/plus/v1/people/115950284...320?fields=image&key={YOUR_API_KEY}
Response :200 OK
{
"image":
{
"url": "https://lh3.googleusercontent.com/-OkM...AANA/ltpH4BFZ2as/photo.jpg?sz=50"
}
}
Where YOUR_API_KEY is your Public API Access key which is generated through Credentials under APIs & Auth from https://console.developers.google.com/
And While creating Public API access key you can choose Referers URL's from which this request should be made but for checking you should try by not adding any URL to it, if it works then go with URL of your site.
You can choose other fields to send with URL which you may need from here.
Happy Coding!!!
You can get this information using the people.get Google+ API call and specifying the userid of the user you want information for. This will include an image.url field which you can use and resize as appropriate.
Since this is public information for a user, you don't need the user to authenticate to access it. You do, however, need an API Key which you will add to the end of the URL used in the API call.
You can get an API Key by going to https://console.developers.google.com/ under the "APIs and auth" section and "Credentials" subsection. You can then click on the button under "Public API Access" that says "Create New Key".
The URL you'll use to get the info will look something like
https://www.googleapis.com/plus/v1/people/1234567890?key=api_key
and you'll get back a JSON object with the profile info.
Update:
Make sure you have also enabled the Google+ API in the developes console. You can get to this through https://console.developers.google.com/, under the "APIs and auth" section and "API" subsection, you can find the "Google+ API" on the list and turn it on.

Resources