0
votes

Some more background information since my original post may not have been as clear as I had hoped (note this is all in the sandbox): my DocuSign account is connected to two different accounts, one for local dev and another created for staging / prod that I was added to. We have integrator keys and OAuth configs for both accounts. We also have configured Connect webhooks for both, the end-point for my account tunnels to my localhost through ngrok and the ones for the web app points to the same end-point, but with prod / staging hostname.

When testing locally I could login through OAuth with my test account and then our web app would send a document out for signature using my test account's access token. Once signature was complete the connect end-point to tunnel to my localhost would get called and the web app would then fetch the signed document using the user who sent it's access token. It seemed to all work properly, but when retesting in the staging env I noticed that although the integrator key had switched it was actually picking up on the Connect settings for the user I logged in as rather than the Connect settings of the account for the integrator key (I could see the Connect end-point getting hit in my local logs). When initiating the OAuth flow with another separate test user with no Connect settings at all Connect didn't seem to fire at all (no trace in the logs / fails).

What it really boils down to is: When a document's signatures are all in and it is considered complete, does it check the Connect settings for the account of the integrator key or the account which was used to sign in via the OAuth flow? I had assumed it would be the account of the integrator key, but my experience seems to be telling me otherwise.

I hope this clears up my issue / confusion for people who may be reading.

original text from initial post below:

OAuth works great for sending documents out for signature and voiding, but when signing is complete the Connect settings seems to be picking up for the settings of the user who initiated the flow rather than the settings for the app. Wondering if this is the intended behaviour or if i'm missing something.

Since we can't expect our users to enter our Connect end-point in their DocuSign settings as part of on-boarding them (nor would we want to since it would mean all documents including ones not sent from our app would get posted to it) I'm wondering what the best practice is here. I realize that we can get the functionality we want if we abandon Connect and switch to a polling strategy using the users stored access keys, but we would prefer to stick with using Connect if possible.

Is anyone else using OAuth + Connect for their DocuSign integration?

1
Sorry, I don't understand the problem that you're experiencing. How are you creating the Connect webhook subscription, via the web interface or by using the API to create it? Are you using the Connect webhook feature or the eventNotification feature when you send an envelope? Connect notifications don't use Oauth--the DocuSIgn platform calls your application's listener URL. - Larry K
In any case, you should not need to poll. - Larry K
I have re-written the post in hopes to make my issue clearer. Sorry about any confusion, it is a bit hard to explain! - stewbawka
Welcome to StackOverflow! Please upvote all useful answers (including answers to others' questions) And "check" the most helpful answers to your own questions. - Larry K

1 Answers

0
votes

Integrator keys (client_ids in OAuth-speak) are independent of accounts.

A client_id represents a client of the API. Clients are independent of accounts. A particular piece of Client software (and its client_id) can be used by anyone with access to the client software.

In order to access the API via a client, someone needs to be the authenticating user. That is the person who granted permission (via OAuth) for the client to access the API as that person.

The Connect webhook settings are associated with an account, not with a client_id. I recommend using the API to create/check/modify the connect settings. That way your app ensures that the settings are as they should be.

eventNotification webhook settings are set per envelope.

HTH, please respond in comments if it isn't clear.