I have successfully integrated my company's system with DocuSign using DocuSign's SOAP API. I can send, check status and retrieve Envelopes through the SOAP interface.
I have read that the preferred method of getting Envelope status is through an event. Unfortunately I haven't had any luck finding an example of this.
I found some documentation about it HERE.
Has anyone used this way of event / notification from DocuSign that would help point me in the right direction?
There are examples of it on DocuSign's own Lithium forums (which will be made read-only soon) in PHP for example. They're pretty easy to setup, you just need a server listening for the events with the rights ports open and you just add the eventNotification element to your request. You've referenced the SOAP api guide, which the sample PHP code below shows how to implement. There's also a version available for REST API.
You can download DocuSign's SOAP SDK out of GitHub and there's sample PHP project ready of out of the box for you to start modifying and adding in eventNotifications.
// Notifications
$eventNoti = new EventNotification();
$eventNoti->URL = 'http://myurl.com/docusign/updateDocStatus'.$env_id.'/';
$eventNoti->LoggingEnabled = "TRUE";
// Important Stuff below
$envEvent = new EnvelopeEvent();
$envEvent->EnvelopeEventStatusCode = "Completed"; // <---------- Fires on "Completed" only
$envEvent->IncludeDocuments = "TRUE";
$eventNoti->EnvelopeEvents = array($envEvent); // <------------ Add multiple EnvelopeEvent's
$envInfo->EventNotification = $eventNoti;
This link is where the above code is referenced from, along with further discussion that might help.
Another option is to use the DocuSign Connect module to push events to your external listener. The main difference between DocuSign Connect and the eventNotification is that eventNotification is per envelope, Connect is account wide and or user-wide.
Related
This question already has an answer here:
Legacy People API has not been used in project
(1 answer)
Closed 1 year ago.
Google API is active but give error ;
Legacy People API has not been used in project before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/legacypeople.googleapis.com/overview?project= then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.
You don't need to install any other APIs like Google Drive API, Google Sheets API or other except Google+ API,
The error is coming because of "passport-google-oauth": "^1.0.0"
Just change the version "passport-google-oauth": "^1.0.0" to "passport-google-oauth": "^2.0.0" and remove node_modules and package.lock.json file and run "npm i"
That's it
Before the Google+ API Shutdown on March 7, 2019, the people.get and people.getOpenIdConnect methods were available for requesting a person’s profile.
To avoid breaking existing integrations with these methods supporting sign-in, a new minimal implementation only returns basic fields necessary for that functionality, such as name and email address, if authorized by the user. The Legacy People API is where these methods will remain available for existing callers at the existing HTTP endpoints.
The Legacy People API serves a limited new implementation of the legacy Google+ API people.get and people.getOpenIdConnect methods necessary for maintaining sign-in functionality. It is available to existing callers of the original methods that haven't migrated to recommended replacements such as Google Sign-in or Google People API at the time of the Google+ API shutdown.
enter link description here
Thanks
In this case, I'm facing the same issue. This is what I've done to fix it.
Situation:
NodeJS ver 8
"passport-google-oauth": "^1.0.0"
Using Google+ API as Google Sign-in
When I run the apps and click Sign in with Google, what happened then?
Server error
Error log: Legacy People API has not been used in project "xxxx" before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/legacypeople.googleapis.com/overview?project=xxxx then retry.
How I solve it?
Go to Google Console
Click on Google+ API under Social APIs, then click Enable API
Click on Google Drive API under G Suite, then click Enable API
Click on Google Sheets API under G Suite, then click Enable API
Update "passport-google-oauth": "^1.0.0" to "passport-google-oauth": "^2.0.0"
in package.json
remove package-lock.json and node_modules folder (to ensure everything is clear)
run this command : npm install
It works now!
Note: my previous code still using profile._json.image.url to get profile image. Actually, this response was not there anymore. So I delete this code.
Goodbye Google+
Thank you Google People API.
Enabling the Google Contacts API and the Google+ API fixed this issue for me.
Hi I recently stumbeled on the same issue. As explained by Ilan Laloum, Google+ API as been decommissionned completely for new projects.
I found that Google People API works in a similar way. The following example is based on the Bookshelf tutorial in GCP. Source code can be seen here: https://github.com/GoogleCloudPlatform/golang-samples/tree/appengine/go111/cloudsql/getting-started/bookshelf (branch appengine/go111/cloudsql)
import people "google.golang.org/api/people/v1"
...
// retrieves the profile of the user associated with the provided OAuth token
func fetchProfile(ctx context.Context, tok *oauth2.Token) (*people.Person, error) {
peopleService, err := people.NewService(ctx, option.WithTokenSource(bookshelf.OAuthConfig.TokenSource(ctx, tok)))
if err != nil {
return nil, err
}
return peopleService.People.Get("people/me").
PersonFields("names,coverPhotos,emailAddresses").
Do()
}
This method needs a context and a OAuth token, just like Google+ API used to. The peopleService is initialized in a similar fashion.
The peopleService.People.Get("people/me") prepares a query that fetches the profile of the connected user. Then PersonFields("names,coverPhotos,emailAddresses") is a filter on profile fields. This part of the request is mandatory. Eventually Do() will execute the request.
This issue can be fixed using the passport-google-token
npm install passport-google-token
const GoogleStrategy = require('passport-google-token').Strategy;
// Google OAuth Strategy
passport.use('googleToken', new GoogleStrategy({
clientID: CLIENT_ID,
clientSecret: CLIENT_SECRET
}, async (accessToken, refreshToken, profile, done) => {
try {
console.log('creating a new user')
const newUser = new User({
google: {
id: profile.id,
email: profile.emails[0].value
}
});
await newUser.save();
done(null, newUser);
} catch (error) {
done(error, false, error.message);
}
}));
I was also having the same issue but with my Rails app. So I resolved it by upgrading the omniauth gems by running bundle update devise omniauth omniauth-google-oauth2 in terminal.
I also faced the same issue. This issue may occur for using the old library, enable the google people Api for your project, and download the library as per your php version from this link and integrate it.
Background information:
I'm trying to create a PoC for Google Cloud Vision API using their .NET library.
What I have done:
Create a simple console apps with the following code for Vision API.
GoogleCredential credential = GoogleCredential.FromFile(ConfigurationManager.AppSettings["GoogleCredentialFile"]);
Grpc.Core.Channel channel = new Grpc.Core.Channel(Google.Cloud.Vision.V1.ImageAnnotatorClient.DefaultEndpoint.ToString(), credential.ToChannelCredentials());
var client = Google.Cloud.Vision.V1.ImageAnnotatorClient.Create(channel);
var image = Google.Cloud.Vision.V1.Image.FromFile(#"C:\Users\u065340\Documents\sample.jpg");
var response = client.DetectLabels(image);
foreach (var annotation in response)
{
if (annotation.Description != null)
result = annotation.Description;
}
Problem:
The line client.DetectLabels(image) gets stuck for a long time before ultimately throwing the error Deadline Exceeded.
My code sits behind a corporate proxy, but I have validated that it is not blocking internet access because I can call https://vision.googleapis.com/$discovery/rest?version=v1 from the same apps and get its JSON response just fine.
Any suggestions?
After digging around through github issues related to proxies as suggested by Jon Skeet, I found that Google Cloud Client APIs can be generally divided into 2 categories (Ref: here): REST-based HTTP 1.1 with JSON and gRPC.
For APIs associated as REST-based, there should be no issue with proxies. The problem starts to appear when we are using gRPC-based APIs such as Google Cloud Vision and Google Speech. In gRPC, we need to explicitly provide our proxy server information.
For those using Java Client, it seems we still can't set proxy properly because it will eventually be ignored, and causing the Deadline Exceeded error. This issue is already well known and can be found at here and further traced into here.
The Google team has determined that it is indeed a bug, and the status remains Open.
As for C# Client, we can set proxy information using gRPC Environment Variables which is documented in here. The code is Environment.SetEnvironmentVariable("http_proxy", <your_proxy_server>);
After I set the http_proxy environment variable pointing to my proxy server, all is well again. I get the expected output "This API needs Billing Account".
Many thanks to Jon Skeet for pointing me in the right direction :D
I'm coming to .net web api from a JavaScript background, and I'm trying to make a proxy to help with a cross domain JSON request. I'm GETing from a server I don't control the source code for, so I can't configure CORS directly. Likewise, it doesn't speak JSONP.
So two questions as I try to get my head around Web API:
1) Is Httpclient the right tool for this job? (if not, what is?)
2) If httpclient IS the right tool, what is an absolute bare bones httpclient config so I can test this out? Not worried about throwing exceptions or anything else other than just GETing API data and feeding it to a jQuery client.
I guess one other piece of information that would be nice would be building username / password authentication into the http request.
Any help is much appreciated, as are links to any good blogs / tutorials / etc that might help as an introduction to this sort of thing. I've watched several today alone, and I'm still not able to get a basic http request going on the server side without resorting to cutting / pasting other people's code.
Thanks in advance!
** EDIT - To make this question a bit more clear, what I'm trying to test is 1) Can the proxy connect to the third party server, which involves authentication via a username and password 2) Can the proxy then respond to the jQuery client request with the JSON data it received from the third party server.
Thanks to all who have taken the time to respond.
HttpClient seems to be ok in this job.
About the minimal config- it depends on what the third party expects. In most cases would work out-of-the-box, but there always may be some minor tweaks like headers and/or auth code.
I have just found some blog entry where some author shows how to test such a proxy and shows the proxy code too. Please see: http://www.davidbreyer.com/programming/2014/10/11/create-fake-responses-to-rest-service-calls-in-c/
You can find info about sending credentials here: How to use credentials in HttpClient in c#?
HTH
EDIT:
this sample code should work (copied from blog above and modified):
public class Proxy
{
public async Task<ExampleDto> GetExample(int id)
{
var client=new HttpClient();
//set some auth here
//set other headers
var response = client.GetAsync(
string.Format("/api/restserviceexample/{0}", id))
.Result.Content.ReadAsAsync<ExampleDto>();
return await response;
}
}
It's so simple that you can just run it and see if the other server responds. If not, you can play with headers - since all the session info and user auth info are sent using ookies and/or headers, all you have to do is to see how it's made with regular browser and then fake it on the server. Probably best tool for this job will be Fiddler.
However - there is one thing to consider. If the other service has special method for authorization (other than passing credentials with each request) the whole thing becomes tricky, since your proxy should perform authorization using their service, then store their auth cookie on the server or propagate them to the browser and attach them with all next requests.
First, you don't need ASP.NET with C# if you really want minimal.
.NET has great http handling without ASP. Check out classes like HttpListener, HttpListenerContext, HttpListenerRequest, etc... Yes, you'll have to write some boilerplate as your application, but these classes are pretty good.
See among others:
http://www.codeproject.com/script/Articles/ViewDownloads.aspx?aid=599978
Second, if you want user & password, I'd checkout using oauth authentication so you don't have to deal with them directly. Google Plus, Windows Live, Facebook, etc... all have similar OAuth 2.0 APIs for that. See among others:
http://msdn.microsoft.com/en-us/library/dn659750.aspx
https://developers.google.com/+/web/signin/server-side-flow
https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow/v2.2
I'm just trying to make an yahoo boot that send to registered user of my application an instant message. I've spent some hours searching the web on how to do it but yahoo developer documentation sucks.First of all I don't know what servers I should use for authorization, log in, and messaging. I have a consumer key and I've tried to follow this steps but nothing works.
Any advice/suggestion is welcome.
The documentation looks to be very good, I think the issue here is that your knowledge of how REST API's work in general is a bit lacking.
Let's talk about diagram #2: Get a request token using: get_request_token.
get_request_token is part of an HTTP endpoint, and in their diagram they want you to pass in a handful of parameters to validate your request.
oauth_consumer_key
oauth_nonce
oauth_signature_method
etc
(If you need more clarification of any step you can find it in the tree view on the left hand side of the page)
The request URL:
https://api.login.yahoo.com/oauth/v2/get_request_token.
Now at this point you can either use the HTTP GET or POST verb. If you decide to use GET you will need to include those above parameters as a query string.
?oath_consumer_key=myConsumerKey&oauth_nonce=oathNonce etc
I will leave it to you to write the associated C# code. You'll want to start off with the HttpWebRequest.Create() method
Currently I am using Codeplex's Facebook Developer Toolkit version 2 for my ASP.net Facebook application. I would like to be able to send notifications to a user's Inbox or wall of the application and was wondering what are the available functions to do that? If not in the API, then please provide example functions from the main Facebook library. This will help immensely. Thanks!
After a brief search I found an example of sending notifications using the toolkit:
facebook.Components.FacebookService fs
= new facebook.Components.FacebookService();
fs.ApplicationKey =
ConfigurationManager.AppSettings["APIKey"];
fs.Secret =
ConfigurationManager.AppSettings["Secret"];
string sessionKey =
dict["facebook_session_key"];
fs.SessionKey = sessionKey; fs.uid =
long.Parse(member.FacebookId);
fs.notifications.send(member.FacebookId,
"notification message");
(from: http://facebooktoolkit.codeplex.com/Thread/View.aspx?ThreadId=49876)
After looking through the Codeplex source it's clear that this sends a user-to-user notification, and therefore requires an active user session of the sender.
Codeplex does not appear to support app-to-user notifications which do not require a session, but adding this feature would be trivial. Add a type variable to the send method and set it accordingly based on the API documentation here: http://wiki.developers.facebook.com/index.php/Notifications.send
The source code for the notifications.send method in the Codeplex Developer Toolkit is here:
http://facebooktoolkit.codeplex.com/SourceControl/changeset/view/28656#233852
Please keep in mind that the Codeplex developer toolkit source code has not been updated in over 3 months. This means that it does not support many new Facebook API features and changes. You may want to browse the client library wiki page to find a library that is more up to date: http://wiki.developers.facebook.com/index.php/Client_Libraries