user can not sign because there’s no URL created and sent to us from Docusign - docusignapi

We are receiving the following error when I try to create a recipient view. Basically the document is sent to 2 users, one of them has already signed but the other user can not sign because there’s no URL created and sent to us from Docusign. We are using node.js docusign sdk.
var recipientView = new docusign.RecipientViewRequest();
recipientView.setReturnUrl();
recipientView.setUserName();
recipientView.setEmail(;
recipientView.setAuthenticationMethod("email");
recipientView.setClientUserId();
var envelopesApi = new docusign.EnvelopesApi();
envelopesApi.createRecipientView(accountId, envelope.id, recipientView,
function(error, viewUrl, response) {
// no url is returned here.the error (in the image) is shown
});
I printed the values of accountId, envelopeId and those seemed to be fine.I checked if the user had changed his first name, last name and there were no errors there. If I create a new user from scratch everything works fine.
FrontEnd Error
Response Error

Through your screenshots it looks like you are getting an UKNOWN_ENVELOPE_RECIPIENT error returned from the API. This means the recipient data you are sending to identify the recipient is not correct. It needs to exactly match the data you assigned to the recipient when you added them to the envelope, such as name, email, recipientId, and clientUserId.
Try calling the EnvelopeRecipients: List API before you make the request to generate the URL and ensure that the recipient data matches what you are sending in your createRecipientView() request. That should help identify which piece of data is off, once you correct that the call will then start returning the proper URL.
Also see the Embedded Signing features page in the DocuSign Developer Center which shows exactly which params you need to set etc:

Related

Stripe API and Excel VBA - syntax for HTTP Post request

I'm trying to create a customer in Stripe using Excel VBA and the Stripe API. I'm able to do this successfully, however I've hit a snag.
When I send the following URL to the API, I am successfully creating a customer with the following parameters (auto_advance, collection_method, customer) set.
b_url + "/v1/invoices?auto_advance=false;collection_method=charge_automatically;customer=" + customerid
However, I am struggling on the syntax required in my URL when attempting to send values to a parameter with child attributes. Stripe customer object has a parameter called "custom_fields" that I would like to populate. The param requires a custom_fields.name and custom_fields.value.
How do I send parameters with a "dot"?
So it turns out the URL needs to be formatted as an array value to pass these. So sending
;custom_fields[0][name]=Provider;custom_fields[0][value]=TestName
worked great.

How to determine which user clicked on a button

I'm sending messages with block elements (buttons) to channel using Slack API. How can I get the username displayed when someone approves or rejects the request? I send the message using chat.postMessage.
You should have interactivity enabled for your app. Since you are using buttons you need to reference how to handle interactive components. Essentially, you need to give your buttons an action_id which is it's unique identifier and will help you determine the source of the action (including the user) when the button is clicked. You will parse the action payload that sent to your app to get the user information you need and use that information in a subsequent call to chat.postMessage.
I was having trouble getting the user with the payload, using body instead worked for me:
In Bolt Python:
#app.action("approve_button")
def approve_request(ack, say, body, payload):
# Acknowledge action request
ack()
user_details = body['user']
username = user_details['name']
.....

Getting 'Invalid envelope status' resending documents through Docusign API

I am re-sending documents via the API. This has worked for a long time, and suddenly started getting these errors? I can't figure out what is going on? Does anyone have any ideas?
The actual envelope status is 'Waiting on Others', which of course is not in the list below, but we need to resend the envelope, because the user never got the email. So how do I deal with this?
{ "errorCode": "ENVELOPE_INVALID_STATUS",
"message": "Invalid envelope status. Envelope status is not one of: Created, Sent, Delivered, Correct." }
EnvelopesApi envelopesApi = new
EnvelopesApi(GetBasePath(myAccount.BaseUrl));
envelopesApi.Configuration.AddDefaultHeader(
"X-DocuSign-Authentication", JsonConvert.SerializeObject(myHeader));
EnvelopesApi.UpdateRecipientsOptions options = new
EnvelopesApi.UpdateRecipientsOptions();
options.resendEnvelope = "true";
envelopesApi.UpdateRecipients(myAccount.AccountId,
EnvelopeId, docuSignRecipients, options);
You're not showing what the docusignRecipients value is.
I suggest you first obtain the recipients object via EnvelopeRecipients::list and then use it in the call.
Also, at the API level, there is no envelope status of Waiting on Others. I suggest you also obtain the envelope status so you can see what is going on.
I'm sorry to hear that your code was working and then stopped. That would indicate a regression test problem. Does your code still work on demo?

Password type field in gmail card service

Right now, in gmail appscript we don't have any option to add a password type field.
Gmail Card Service for add-on has a very good ability to show any thing in it. We can integrate with any app which has basic REST api. We need authentication for that which commonly need password type field.
Any work around to show password type field?
As of now, there is no support for password field in Gmail add-on.
But we can build a hack for it. I hope password is needed only in registration forms. So, we can build a registration form using HTML and that can be served through authorization action.
CardService.newAuthorizationAction().setAuthorizationUrl(loginUrl)
Here, host registration HTML in a web server and pass this URL as "loginUrl" in the above snippet. We have to supply AuthorizationAction for the signup/register button. So, when the user clicks on this button, a new popup page is launched, the user will give the username, password, etc... onsubmit, we can encode all the form data and pass it to the parent Gmail add-on by redirecting it to a script redirection URL which you can generate an add-on. Once the redirection to the script URL comes, there will be a callback in our add-on code from there you can get the form fields which were encoded from registration HTML page.
function generateNewStateToken(callbackName, payload) {
return ScriptApp.newStateToken()
.withMethod(callbackName)
.withArgument("payload", JSON.stringify(payload))
.withTimeout(3600)
.createToken();
}
function getRedirectURI() {
return "https://script.google.com/macros/d/" + ScriptApp.getScriptId() + "/usercallback";
}
var state = generateNewStateToken("registerCallback", {"signup": true});
var reg_url = <reg_url> + "?redirect_uri=" + getRedirectURI() + "&state=" + state;
function registerCallback(cbResp) {
// to access payload which passed in state token: cbResp.parameter.payload;
// in the html serialize all the form fields or data which you want to pass to plugin as query params like: <redirect_uri>?form_data=<encoded_data>&state=<state>
//Note: here the registration HTML page should parse the URL to get the state & redirect_uri from URL.
// to access form_data: cbResp.parameter.form_data
}
I hope this will help you. This is how we are doing the signup/signin flow now.
Looks like you are authorizing a non google service . Please refer to Authorizing custom google services .

Retrieve GMail data through DotNetOpenId

I'm Trying to login with dotNetOpenId to GMail accounts. It works but I'm not able to retrieve any claims. I know I could retrieve email addresses or user names as well, but no claims are being returned only the ClaimedIdentifier is available. Anyone know how to retrieve this data from Gmail accounts? If you could please provide me an example of ClaimsRequest configuration I would be grateful.
Thanks
// Either you're creating this already or you can get to it in
// the LoggingIn event of the control you're using.
IAuthenticationRequest request;
// Add the AX request that says Email address is required.
var fetch = new FetchRequest();
fetch.Attributes.Add(
new AttributeRequest(WellKnownAttributes.Contact.Email, true));
request.AddExtension(fetch);
Google then authenticates the user and returns the email address, which you can get with:
var fetch = openid.Response.GetExtension<FetchResponse>();
if (fetch != null)
{
IList<string> emailAddresses = fetch.GetAttribute(
WellKnownAttributes.Contact.Email).Values;
string email = emailAddresses.Count > 0 ? emailAddresses[0] : null;
}
You can see my blog post on the subject for a bit more information. The important thing to note here is that Google will only tell you the user's email address if you mark it as required (as I have done in the above snippet). But this also means that if the user does not want to share his email address, he cannot log in at all. Sorry, that's the way Google set it up. Other Providers that people use have different behaviors, unfortunately.

Resources