marcp_24datainc

PHP Form Submit Error

0 votes
Good day, I am working on integrating the esignlive for pdf form applications. During my research I found this guide that seemed like would be exactly what we needed. https://www.esignlive.com/blog/esignlive-how-to-creating-a-simple-php-web-application I tried to use it but ended up with the following error (seen attached). Unauthorized Access We're sorry. Your session may have expired. Please try again. If you receive this message multiple times, please contact support. I made sure I had the most up to date code from the git repository and did test it cross browser but still had the same error come up. Thank you in advance for your help.

Attachments

Reply to: PHP Form Submit Error

0 votes
Hi Marc, When you are receiving Unauthorized Access error, it could probably because you didn't put the right url (sandbox.esignlive.com vs sandbox.e-signlive.com) corresponding to your environment or correct api-key as the attachment shows. If all the info is put correctly, we can find out other potential reasons together. Hope this could help you! Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Attachments
7-27.png31.29 KB

Reply to: PHP Form Submit Error

0 votes
Thank you Duo, By your suggestion I tried both urls in my code. Please see the attached screen shots with the same error that I received. If there is anything else you need to help me out let me know. Thank you again for your support.

Attachments

Reply to: PHP Form Submit Error

0 votes

Hi Marc, First, please note that that URL should keep the same with the one you use to log onto your WebUI. As OneSpan Sign has more environments than these two situations. For example, If I am using sandbox US v11 portal, I am using https://sandbox.esignlive.com/a/login?destination=/a/dashboard this URL to log onto my dashboard, so that my API URL should has the same prefix like :https://sandbox.esignlive.com. Then if you still encounter the same problem, it's always suggested to test the REST function in Postman first as the attachment shows.(It's a REST call to create a basic transaction) And the request payload, you can use the following one:

{
  "documents": [
    {
      "approvals": [
        {
          "role": "Role1",
          "fields": [
            {
              "page": 0,
              "top": 100,
              "subtype": "FULLNAME",
              "height": 50,
              "left": 100,
              "width": 200,
              "type": "SIGNATURE"
            }
          ]
        },
        {
          "role": "Role2",
          "fields": [
            {
              "page": 0,
              "top": 300,
              "subtype": "FULLNAME",
              "height": 50,
              "left": 100,
              "width": 200,
              "type": "SIGNATURE"
            }
          ]
        }
      ],
      "name": "Test Document"
    }
  ],
  "status": "SENT",
  "roles": [
    {
      "id": "Role1",
      "signers": [
        {
          "email": "[email protected]",
          "firstName": "1.firstname",
          "lastName": "1.lastname"
        }
      ]
    },
    {
      "id": "Role2",
      "signers": [
        {
          "email": "[email protected]",
          "firstName": "2.firstname",
          "lastName": "2.lastname"
        }
      ]
    }
  ],
  "name": "Example Package"
}

This payload includes the minimum fields in the request as previous post mentioned.

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Attachments
7-30-1.png13.58 KB
7-30-2.png13.97 KB

Reply to: PHP Form Submit Error

0 votes
Hi Duo, Thank you for you help trying to solve this for me. I doubt checked everything and did run tests via postman and am still getting errors. In postman this is coming up.
{
    "messageKey": "error.notFound.userNotFound",
    "technical": "Could not find user with uid '[email protected]'",
    "message": "The specified user cannot be found.",
    "code": 404,
    "name": "Resource Not Found"
}
Now when I got the the https://sandbox.esignlive.com/api/packages/ it does show code (attached capture_7-30_4.PNG). Thank you for your support with this.

Attachments

Reply to: PHP Form Submit Error

0 votes

Hi Marc, One more thing, Haris had updated his code related to that blog, you can get the updated code from Github, here. And the following is a previous post talking about the same issue with you. https://community.onespan.com/forum/attempting-use-simple-php-web-application About this "can't find user with uid" issue, it's wired in your case as: 1. previous users they got this problem when using a wrong url, while you are using a correct one. 2.they receive this error(including me) with the uid of their account owner's Role ID, while in your case, you got your email address. 3.If the fourth screenshot is the response payload you receive for your account, that means you successfully created some packages already? 4.Again in the fourth screenshot, the Role ID, I considered it's your account owner's role id and checked in our backend system, but I couldn't find you in the US v11 sandbox environment. Can you share more information about your case with me? Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: PHP Form Submit Error

0 votes
Hi Duo, I went and generated a new form from a fresh git pull and only put my api key into it and checked the url was correct. I am still getting the Unauthorized Access message. To answer your other questions. I did create a few packages using the web-form to test, I even upload the pdf file in the tutorial to see if that might be the issue by not having it and even tested by having all the field created because this is what we are looking to do eventually (see attached image). When looking at the data in screen shot 4 it matches the data I was testing in the web-form but after I deleted all the forms from the web builder and it shows:
{
    "results": [ ],
    "count": 0
}
As for my account info I have attached a few screen shots of what I am seeing. I do not know what else I could provide in regards to my account. Now when I did setup the sandbox account it did take some time to get my conformation email to start working with it. My biggest concern is I want to make sure that I can test what our client wants before they go through and purchase your product only to find it does not fill the role we think it will. If needed could my account be reset (or deleted and recreated) to see if that is the issue. Let me know if there is anything else I can do to help finding a solution to this. Thank you very much for your time.

Attachments

Reply to: PHP Form Submit Error

0 votes
Hi Marc, Yes, create a new account and try everything from scratch is a good idea. Unfortunately we can't delete the account with your email in the backend system since you have already sent some packages. But you can always change another email and create a new sandbox account again. If you still suffering from the "Unauthorized access" problem, you can contact [email protected] with the brief description of your issue, and I would create some video tutorial for you. Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: PHP Form Submit Error

0 votes
Duo, Thank you. I worked with a colleague and was able to get it working. After figuring out an issue with how the data was being passed. Again thank you for your support on trying to get this up and running.

Reply to: PHP Form Submit Error

0 votes
Hi Marc, We are glad that you solved your problem. Just let us know if you have any other issues. 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