So there is another ticket here (closed) that talks about how to do this. However, something must have changed since that ticket was answered.
I followed the very sparse documentation at DocuSign, and keep getting stuck.
I followed another ticket here exactly, and I'm still getting an error that I can't resolve. I do have dozens of different types of calls working perfectly, this is the only call (so far) that I have tried that I can't get to work.
I have a recipient that lost their email. I need to resend to them. No changes to the document are necessary.
I do a 'PUT' to the following URL:
https://na4.docusign.net/restapi/v2/accounts/{Redacted}/envelopes/{Redacted}/recipients?resend_envelope=true
In the body, I pass the object 'DocuSign.eSign.Model.Recipients'
There is 1 recipient, the one who lost the email. (again, status is 'sent', I checked manually to be sure). I included it below for sake of documentation.
I get the following error. I cannot get past this. The error sounds obvious. It sounds like the recipient document is in a status that cannot be resent, but that's simply not the case. I've verified the status, I've verified that account # is correct, I've verified that document id and recipient id are correct. Just not sure what else I can check.
I just need to resend this, and this call should be the right call. According to the documentation, 'PUT' is the correct verb.
{
"recipientUpdateResults": [
{
"recipientId": "1",
"errorDetails": {
"errorCode": "RECIPIENT_UPDATE_FAILED",
"message": "The recipient could not be updated.
Recipient not in state that allows correction."
}
}
]
}
Body of document that is being sent. I've tried both with emailBody & emailSubject NULL, or the original values. Neither way works.
{
"signers": [
{
"email": "{Redacted}",
"emailNotification": {
"emailBody": "{Redacted}",
"emailSubject": "{Redacted}"
},
"name": "{Redacted}",
"recipientId": "1",
"tabs": {
"dateSignedTabs": [
{
"documentId": "1",
"pageNumber": "1",
"recipientId": "1",
"xPosition": "60",
"yPosition": "757"
}
],
"signHereTabs": [
{
"documentId": "1",
"pageNumber": "1",
"recipientId": "1",
"xPosition": "50",
"yPosition": "652"
}
]
}
}
]
}
If the envelope was already sent, meaning it's not longer in "draft" status you cannot simply modify it anymore.
Envelopes can be modified at will only when they are in "draft" state and if your envelope was in that state - you wouldn't get this error.
Once the envelope was sent ("sent" state) you need to use special Correct action for any changes. That can be initiated by putting envelope into correct state and potentially giving user the correct view where they can add/remove recipients and tags.
Update: If you are just trying to resend the envelope, make sure the JSON body of your request is empty ({}). Empty object in C# will do the trick...
Update 2: Need to use REST API v2.1 and not v2.0.
Related
I have a teams bot sending adaptive cards proactively to users when desired. When the user presses submit on the form i'm making a POST request to another web service that returns the following payload:
{
success: bool,
message: ''
}
If the result is a success (success: true), i will be updating the adaptive card.
But if the result is not a success (success: false), i want to simply show an error as shown below.
How do i go about showing an error message like above? Any help appreciated.
There's nothing out of the box per se for an error message exactly like that, but you could mock something up using by embedding an image, and adding some text using one of the built-in text styles to get the red colour. In particular, look at the "Color" section in this doc and using the "attention" colour. Here's a running sample.
In your case, you want an image and text, so you'd need a columnset, like this:
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"width": "auto",
"items": [
{
"size": "small",
"style": "person",
"type": "Image",
"url": "path to your image"
}
]
},
{
"type": "Column",
"width": "stretch",
"items": [
{
"type": "TextBlock",
"text": "whatever your error message is",
"weight": "bolder",
"wrap": true,
"color": "attention"
}
]
}
As a further point, because you're wanting items to appear below the buttons, you'd want to use an "actionset" to position the buttons in the middle of the card, rather than always in the bottom. See here for more, unless you don't mind exactly where the error text appears.
[update] Have a look at the initial sample on the Designer, and especially at the "bleed" property, for making the text full width.
We are trying to create a simple integration for a Forge App with BIM360, we have done loads of stuff using the 3 legged contexts but now we are trying to expose (some functionality) to users without the need for them to explicitly log into their Autodesk account.
All very exciting stuff!
We are making the following call within a 2 legged context as per the documentation (apiReferenc: https://forge.autodesk.com/en/docs/data/v2/reference/http/hubs-hub_id-projects-GET/#headers , C# reference: https://github.com/Autodesk-Forge/forge-api-dotnet-client/blob/master/docs/ProjectsApi.md#gethubprojects) and would like to add the x-user-id to this call
var api = await factory.CreateProjectsApiAsync(TwoLeggedToken);
var apiResult = await api.GetHubProjectsAsync(hubId);
The x-user-id is instrumental in filtering so the users are only able to see and access the hubs/projects they are added to.
We, however, can't find how to implement this x-user-id in the c# forge package. The different c# forge package API's configuration have Username, UserAgent but no user id or similar properties. We also can't seem to find the type of user id the x-user-id header expects. Is this the full name of an Autodesk account (ex: "Samuel Middendorp"), the username specified in the Autodesk account settings. s.middendorpXXXX or the user id specified when looking at forge calls responses (for example createUserId).
I hope any of you fine people at Autodesk could help me out here!
I would also like to Thank Bryan Huang for quickly answering our previous questions about missing typings and more and helping us get to this point in development!
Thank you for reporting. I have created an issue on our forge-api-dotnet-client repository to our team to allocate time to add this support, please see:
https://github.com/Autodesk-Forge/forge-api-dotnet-client/issues/63
In reference to your question about which id the x-user-id header requires, it is the uid.
If you have a two-legged token, you can retrieve this by searching for a user by email with the BIM 360 API users/search endpoint:
https://developer.api.autodesk.com/hq/v1/accounts/:hubId/users/search?email=:userEmail
Here's a sample response:
[
{
"id": "579d4408-39a4-4b3a-9474-6e781e68ab94",
"account_id": "9dbb160e-b904-458b-bc5c-ed184687592d",
"status": "pending",
"role": "account_admin",
"company_id": "14e95a5e-02eb-49aa-a39a-447d90544873",
"company_name": "Autodesk",
"email": "john.smith#mail.com",
"name": "John Smith",
"nickname": "Johnny",
"first_name": "John",
"last_name": "Smith",
"uid": "L9EBJKCGCXBB", // This is the one you want
"image_url": "http://static-dc.autodesk.net/etc/designs/v201412151200/autodesk/adsk-design/images/autodesk_header_logo_140x23.png",
"last_sign_in": null,
"address_line_1": "The Fifth Avenue",
"address_line_2": "#301",
"city": "New York",
"postal_code": "10011",
"state_or_province": "New York",
"country": "United States",
"phone": "(634)329-2353",
"company": "Autodesk",
"job_title": "Software Developer",
"industry": "IT",
"about_me": "Nothing here",
"created_at": "2015-04-29T06:59:05.582Z",
"updated_at": "2015-04-29T06:59:05.582Z"
}
]
How do I generate a blank "Initial" when sending someone to DocuSign to sign a document? It is currently generating the initials based upon the name of the signer, but the problem is that the signer might have PHD or something added to the end of their name. Thanks!
There's an account setting called SignInEachLocation that might be what you are after. Normally the DocuSign platform gives you the option to adopt one of the pre-generated signature and initial styles however if you don't want that and instead want your signers to sign and initial in each location you can enable this property on a per recipient basis.
Here is the description from the DocuSign API Docs:
signInEachLocation
When set to true and the feature is enabled in the sender's account, the signing recipient is required to draw signatures and initials at each signature/initial tab (instead of adopting a signature/initial style or only drawing a signature/initial once).
This property is configured on the individual signer objects in your envelope definitions, for example:
{
"status": "sent",
"emailSubject": "Request a signature via email example",
"documents": [{
"documentId": "1",
"name": "contract.pdf",
"documentBase64": "base64 encoded bytes..."
}],
"recipients": {
"signers": [{
"name": "John Doe",
"email": "john.doe#docusign.com",
"recipientId": "1",
--> "signInEachLocation": "true",
"tabs": {
"signHereTabs": [{
"xPosition": "25",
"yPosition": "50",
"documentId": "1",
"pageNumber": "1"
}]
}
}]
}
}
I've written an application that automates the sending of mail from our system via a small console app that i've designed to run in azure as a webjob. The app sends mail perfectly fine until I attempt to add a collection of attatchments. Referring to https://msdn.microsoft.com/office/office365/APi/mail-rest-operations#Createandsendmessages
I've attempted to send their sample code for this with my Attatchments collection containing a single object that looks like this
{
"#odata.type": "#Microsoft.OutlookServices.FileAttachment",
"Name": "menu.txt",
"ContentBytes": "bWFjIGFuZCBjaGVlc2UgdG9kYXk="
}
However, after this api request was rejected with the error:
{"error":{"code":"RequestBodyRead","message":"The property 'ContentBytes' does not exist on type 'Microsoft.OutlookServices.Attachment'. Make sure to only use property names that are defined by the type."}}
And furthermore spending half an hour on the outlook services support line to fobbed off with go checkout some forums and to read the article I'd been using for reference since I started the project I've thrown in the towel. If anyone can assist me in getting this api to accept the request I'd be eternally thankful.
This is what a sample request looks like.
POST https://outlook.office.com/api/v2.0/me/sendmail
{
"Message": {
"Subject": "Meet for lunch?",
"Body": {
"ContentType": "Text",
"Content": "The new cafeteria is open."
},
"ToRecipients": [
{
"EmailAddress": {
"Address": "garthf#a830edad9050849NDA1.onmicrosoft.com"
}
}
],
"Attachments": [
{
"#odata.type": "#Microsoft.OutlookServices.FileAttachment",
"Name": "menu.txt",
"ContentBytes": "bWFjIGFuZCBjaGVlc2UgdG9kYXk="
}
]
},
"SaveToSentItems": "false"
}
And I'm aware that the message object has a bool flag of HasAttachments which when set to true does not affect the outcome of the call.
Based on the error message, you were using the ‘Microsoft.OutlookServices.Attachment’ intead of ‘Microsoft.OutlookServices.FileAttachment’.
I can reproduce this issue when I use the ‘Microsoft.OutlookServices.Attachment’ too.
And the sample above which use ‘Microsoft.OutlookServices.FileAttachment’ works well for me.
Please ensure that you were using the ‘Microsoft.OutlookServices.FileAttachment’ to send the text attachment.
I am working on a task where there are list of 3 people who needs to sign the document one after the other. The very first persons DocuSign the document through the application i.e. its an embedded DocuSign. While the other 2 does remote DocuSign.
I am able to achieve the embedded signing but could not figure out how to achieve the remote signing. Since the envelopeID is same. Even if I add recipients to the envelope the remote DocuSign email is not triggered.
Can anyone help me on how to go about on this?
I would need to see your request body to see how you are adding your recipients, but my guess is that you are setting the latter 2 as embedded also.
To make a recipient an embedded one you need to set the clientUserId property for them, in addition to the other expected info (i.e. email, name, etc). If you do NOT want the recipient to be an embedded one, simply do not set the clientUserId property for them.
For instance, the following (partial) JSON would set the first recipient as an Embedded one and the 2nd and 3rd recipients as remote, meaning will get an email notification to to sign:
"recipients": {
"signers": [
{
"routingOrder": "1",
"recipientId": "1",
"clientUserId": "1000",
"name": "Sally Doe",
"email": "test_1#email.com"
},
{
"routingOrder": "2",
"recipientId": "2",
"name": "John Doe",
"email": "test_2#email.com"
},
{
"routingOrder": "3",
"recipientId": "3",
"name": "Jonny Moe",
"email": "test_3#email.com"
}
]
}
For more information please see the Explore -> Features -> Embedding page on the DocuSign Developer Center:
https://www.docusign.com/developer-center/explore/features/embedding-docusign