Motard

This signature is not assigned to you for signing. response

0 votes
Hello, I am getting the following response, and I believe that I am sending the correct data. I will copy here the request I am making
request: 
   { debugId: 1,
     uri: 'https://sandbox.esignlive.com/api/packages/oGGmH-MrSdWrf3hPBMirqiiCgG8=/documents/b98bb1fa64f49dc9003b230c401426c9cf86be9bbe319ca7/approvals/CZbduLYWcIEG/sign',
     method: 'POST',
     headers: 
      { Authorization: 'Basic xxxxxxxxxxxxxx',
        Accept: 'application/json; esl-empty-json=true; esl-api-version=11.0.3',
        'Accept-Encoding': 'gzip, deflate, br',
        'Content-Type': 'application/json; esl-api-version=11.0.3; esl-empty-json=true',
        Cookie: 'ESIGNLIVE_SESSION_ID=xxxxxxxxxxxxxxxxxx',
        host: 'sandbox.esignlive.com',
        'content-length': 299 },
     body: '{"data":{},"fields":[{"binding":null,"data":{},"height":60,"id":"Zt0ZzUtqcBAZ","left":76,"name":"","page":0,"subtype":"FULLNAME","top":453,"type":"SIGNATURE","validation":null,"value":null,"width":270}],"id":"CZbduLYWcIEG","name":"Entity 1530779831891","role":"58fec672-635a-4071-91c9-fd823330ec4e"}' } }
And this is the response I am getting:
response: 
   { debugId: 1,
     headers: 
      { server: 'nginx',
        date: 'Thu, 05 Jul 2018 09:42:23 GMT',
        'content-type': 'application/json',
        'transfer-encoding': 'chunked',
        connection: 'close',
        'x-powered-by': 'Undertow',
        allow: 'GET, POST, HEAD, PUT, PATCH, DELETE' },
     statusCode: 403,
     body: 
      { messageKey: 'error.forbidden.signatureNotAssigned',
        code: 403,
        message: 'This signature is not assigned to you for signing.',
        name: 'Access Denied' } }

Approved Answer

Reply to: This signature is not assigned to you for signing. response

0 votes
Hi Motard, To get a session token for a specific signer, there are two steps: 1. To create an authenticationToken for this signer by using the following api and request payload:
POST /api/authenticationTokens/signer/multiUse

{
  "packageId": "packageId",
  "signerId": "signer1",
  "sessionFields": {
    "Bulk Signing on behalf of": "signer1"
  },
  "value": null
}
The generated token would appear in the value attribute in response payload. 2. Using this authenticationToken to generate the session token:
POST /auth?signerAuthenticationToken={signerAuthenticationToken}

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: This signature is not assigned to you for signing. response

0 votes
Hi Motard, In this case, please remove the Authorization: 'Basic xxxxxxxxxxxxxx' attribute from your request headers, as you are using ESIGNLIVE_SESSION_ID to simulating signer to sign the signature approval, there shouldn't appear anything about sender. I noticed that you are using api to sign for the specific approval, please make sure the signer has confirmed the consent-document already otherwise you could probably get another error response telling you "violate the signing order". Because in our Bulk Sign guidance, we used a "sign all documents in one call" api which could be different from your case. And I removed the api-key from your post. Thanks for posting and hope this reply could help you! :)

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: This signature is not assigned to you for signing. response

0 votes
I have done that and removed the apikey from the request, but now I am getting unathorized session,
body: 
      { messageKey: 'error.unauthorised.noSession',
        message: 'Failed to retrieve Session',
        code: 401,
        name: 'Unauthorized' }

Reply to: This signature is not assigned to you for signing. response

0 votes
Hi Motard, The "401 unauthorized" error could probably because of the wrong ESIGNLIVE_SESSION_ID. Could you please check whether you have input the right sessionToken?

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: This signature is not assigned to you for signing. response

0 votes
Well probably not. How can I get the ESIGNLIVE_SESSION_ID?

Reply to: This signature is not assigned to you for signing. response

0 votes
Ok this working now. So I just need your help regarding two more calls. One is the call for the signer to confirm the consent-document. And the other call is the call to confirm the signature. So after I make this call
https://sandbox.esignlive.com/api/packages/soem_package_id/documents/some_document_id/approvals/some_approval_id/sign
I need to make another one to confirm the signature. Could you please tell me what that call is, and what type of payload I need to send?

Reply to: This signature is not assigned to you for signing. response

0 votes
Hi Motard, If you simply want to sign all signatures in a transaction in one single call, you can directly use our Bulk Sign For a Signer feature by using the following api call, as /api/packages/{packageId}/documents/{documentId}/approvals/{approvalId}/sign isn't one we'd suggest use of:
HTTP Request
POST /api/packages/{packageId}/documents/signed_documents

HTTP Headers
Accept: application/json
Content-Type: application/json
Cookie: ESIGNLIVE_SESSION_ID={sessionToken}

Request Payload
{
  "documents": [
    {
      "id": "default-consent"
    },
    {
      "id": "your document id1"
    },
    {
      "id": "your document id2"
    },
    {...}
  ]
}
Thanks for your post and hope you find this reply helpful!

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: This signature is not assigned to you for signing. response

0 votes
Hello, I am doing the request to bulk sign but getting This signature is not assigned to you for signing. This is my request
{ request: 
   { debugId: 3,
     uri: 'https://sandbox.esignlive.com/api/packages/i2ULoALa37cb4jimHnHsvcnrNqs=/documents/signed_documents',
     method: 'POST',
     headers: 
      { Cookie: 'ESIGNLIVE_SESSION_ID=xxxxxxxx',
        host: 'sandbox.esignlive.com',
        accept: 'application/json',
        'content-type': 'application/json',
        'content-length': 98 },
     body: '{"documents":[{"id":"default-consent"},{"id":"b6960c2641cd63503866cef5ce364a9772ff61436ceae70d"}]}' } }
And this is the reply:
body: 
      { messageKey: 'error.forbidden.signatureNotAssigned',
        message: 'This signature is not assigned to you for signing.',
        code: 403,
        name: 'Access Denied' }

Reply to: This signature is not assigned to you for signing. response

0 votes
Hi Motrad, Usually when you encountered this 403 "Signature not assigned for you" error, it could because of: 1. The documents id in payload is not available, which I think is your case. I checked the package info for you, it seems that the second document id is "0ec13fe06e7066304e0d0e5d63e16bba6275944dff73f22a" other than the one you put in the payload, in that case, our system can't find the signature approval for this signer in this document. 2. There's no signature approval assigned to this signer in the documents which are involved in body payload 3. You are generating the wrong session token for this signer( using maybe another signer's id to generate session token), may cause the same issue like point 2. Hope you find this reply helpful!

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: This signature is not assigned to you for signing. response

0 votes
Hi. I'm having the same issue when trying to bulk sign on behalf of a signer. I get an 403 error with message "This signature is not assigned to you for signing." when I have more than 1 signer. If I have just 1 signer, it works fine. Attached you can find the code where I'm getting the error and the JSON with the package info. (I'm getting the error on last POST) I hope you can help me.

Reply to: This signature is not assigned to you for signing. response

0 votes
Hi jmramirezo, Your attachments are not uploaded successfully, you can put them in a zip file and post them in a new reply. Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: This signature is not assigned to you for signing. response

0 votes
I'm sorry. Here they go again. Thanks.

Attachments

Reply to: This signature is not assigned to you for signing. response

0 votes
Hi jmramirezo, I received the same error at my side using the same code. So in your fourth call, can you build your request payload in this way instead of adding all documents' metadata?
StringBuilder sb = new StringBuilder(200);
            sb.Append("{\"documents\": [");
            foreach (JObject document in documents) {
                sb.Append("{ \"id\": \"").Append(document["id"]).Append("\"},");
            }
            sb.Remove(sb.Length - 1, 1);
            sb.Append("]}");

            Debug.WriteLine(sb.ToString());
            StringContent jsonContent2 = new StringContent(sb.ToString(), Encoding.UTF8, "application/json");
This seems solved the issue, and please create a new package and test the code. Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: This signature is not assigned to you for signing. response

0 votes
It worked! Thanks a lot!

Reply to: This signature is not assigned to you for signing. response

0 votes
Glad to help! :) Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off