DocuSign parameterized redirect URI - docusignapi

IS there a way to have a parameterized ( or a uri with some wild cards) URI set to redirect
URI in the api portal of DocuSign?
From code I would set something like this.
ReturnUrlRequest.ReturUrl = "example.com/id=100"
On DocuSign API management portal, could I set Redirect URIs
example.com/id=[wildcard]
or
example.com/[wildcard]
where wildcard can be matched to anything?
Thanks

The term redirect_uri is used in multiple places within DocuSign systems.
The redirect uri used as part of the OAuth Authorization Code and Implicit grant flows can not be parameterized.
The redirect uri's that can be set via branding can include query parameters.
The redirect uri's used for embedded sending and other embedded flows can include query parameters.

Correct. To accomplish this, you can create and edit a custom brand for your signing experience. The Redirect URI (referred here as landing pages) can be customized.
To initialize your new custom brand, use the following endpoint.
POST /restapi/v2.1/accounts/{accountId}/brands
Then, in your app logic, you can update the landingPages property to your wildcard value. Note that this property accepts an array of name/value pairs specifying the pages to which the user is redirected after the following events occur:
Signing Completed
Viewed
Exit
Finish Later
Decline Session
Timeout
Authentication Failure
Full Guide on Branding here - https://developers.docusign.com/esign-rest-api/guides/concepts/branding
Here is the API Reference on Branding - https://developers.docusign.com/esign-rest-api/reference/Accounts/AccountBrands/create

Related

DocuSign error "The redirect URI is not registered properly with DocuSign" with proper & valid redirect uri registered in application

We have docusign integrated in our platform & all of a sudden we are getting error from DocuSign
"The redirect URI is not registered properly with DocuSign".
We have proper & valid redirect uri configured in the application.
Please Note that exsisting setup is working fine, for newer apps or newer accounts, it is throwing the above-mentioned error Here is the screenshot of the same .
The redirect uri is valid as it's working for other app.
Has something changed at DocuSign end recently?
Update:
As asked, Please find the redirect uri screenshots below (I've masked the host url),
DocuSign Redirect URI configuration - Please note that both URI are same with difference in host url.
Complete Oauth request url
Redirect window
Make sure to compare the URL you see in the browser to the one in the IK. Make sure it's the same IK, in the same env (production vs. developer env is different!). Even a tiny difference between the two URLs will fail this. You need to URL decode the redirecUri from the main URL and then use that by copy/pasting it into the apps and keys page.
Then wait about 1-2 minutes before trying again.
Edit: confirmed that the URLs DO NOT MATCH, and that is the issue. The URLs must match 100% for this to work
Redirect URIs are specific to each integration key (application) and do not get copied over if you make a new integration key. Based on your description it sounds like you have created a new integration key. I would recommend visiting the Apps and Keys page on your DocuSign Admin settings and adding the redirect URI to the new integration key. Here is a support centre article which outlines this including the steps for how to add a new redirect URI
Nothing in this area has changed on DocuSign AFAIK.
Check that the redirect URI specified in your initial OAuth redirect is the exact same as the URI you set in the Integration Key's settings page.
The redirectURI cannot include any dynamic data including query parameters, etc.
You can use the settings tool's Apps and Keys page to delete and then re-add the RedirectURI. Check carefully that it doesn't include any trailing spaces, etc.
After you've made a change via the Apps and Keys pages, wait 5 minutes before attempting to use the Integration Key.
Ensure that you're using the right Apps and Keys page. If your app has passed go-live then:
For the production systems, use the apps and keys page from docusign.net
For the developer (demo) system, use the apps and keys page from demo.docusign.net

Docusign Redirect URL Not Registered Properly Error

I am using Power Automate for all my API calls to Docusign. I want to be able to capture the authorization code when a user logs into Docusign and then run a flow to get access and refresh tokens.
My flows work when I manually copy the authorization code from a localhost redirection browser session and get the user tokens. I want to be able to redirect to a power automate webhook URL so that when the user logs in, the authorization code is redirected to the power automate webhook trigger where I can grab the authorization code and process it to get user tokens. As an example, I have set up a power automate HTTP webhook trigger and have a URL provided by MS to point to.
https://prod-63.westus.logic.azure.com:443/workflows/887839a887d945919f8a0bb1aa89d2fa/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=_3pQLhhEORjAAe3V_IjCPNgBYnHnw2nrdP-oEoIPvyA
I registered this in Docusign as a redirect URL. No configuration or format error was indicated when registering this URL.
When I attempt to log in via a browser session, after entering my credentials, I get a redirection URL not properly registered error.
Are there format or length or other parameters that prohibit the use of this type of URL as a redirection in Docusign?
I'm 90% certain that the URL you are using is dynamic
The sig=_3pQLhhEORjAAe3V_IjCPNgBYnHnw2nrdP-oEoIPvyA
Represent something that will not be the same next time and therefore, my hunch is that it won't do no good to add this type of URL to the list of redirectURI.
You can check to make sure I'm right by looking at the URL you get when you get the error.
If I'm right, then you would have to change your approach to this.
If I'm wrong, then maybe there's some issue with some special character or some other inconsistency and I can ask our engineers to look into this.
It looks to me like you should use the Custom Connector Authorization section of your connector instead of your current approach.
See this doc

Can we set Redirect URI dynamically or set Redirect URI at runtime if it is not added already in the Stripe Connect Account?

I have a site with dynamic URLs, Now I want to set the Redirect URL in stripe standard account at runtime. I mean, For now, I am compelled to go to my account settings to redirect URL, is there any way we can add new redirect URLs using some API?
One way to solve this is to use the state property when you create an authorize link. This will be passed through the OAuth process.
https://connect.stripe.com/oauth/authorize?response_type=code&client_id=ca_123&scope=read_write&state=special-value
When the user is redirected back to your site, you can grab the state value from the query string (special-value in my example) and then use that to help determine where to redirect the user to a final destination page after you fetch the user's credentials.

Azure AD B2C verification link with dynamic redirect uri & response type

I'm currently implementing custom mail verification for B2C following the sample found on github https://github.com/yoelhor/aadb2c-verification-link
When generating the link I would like to pick up the values for redirect_uri and response_type from the original request instead of defining it in appsettings. Is there a way to pass both query parameters on to the mail app?
I've hit this as well, making something similar for password reset. As far as I can tell, those values are not available from claim resolvers, so you can't get them. Unless you use custom query parameters which duplicate the values.

Handling redirect URIs that include query parameters

I need users to login from a page that has query parameters in the URI, and they need to be redirected back to this page after login. AAD doesn't allow response URIs to contain query parameters though. To make matters worse, the login page URI is dynamic (the query parameters determine the specific page the user is on), so I couldn't put just one response URI anyway. I also have no way of determining the exact parameters, so I can't list several either.
URI examples:
https://example.com/content?page=5211
https://example.com/content?page=6952
What can I do to have users redirected back to the login page so I can get an access token?
This has an answer here.
The answer refers to Google, but the same reason applies to Azure AD

Resources