HTTP Query Issue for Docusign

Hi All,

I am trying to use HTTP Query to get the status of document but I am getting following error:



[success:false,result:,error:[code:[category:0,namespace:1,detail:0],title:HTTP error connecting to demo.docusign.net/.../accounts 401 Unauthorized,detail:No details available]]


I am using the following expression:

a!httpQuery(
url: "demo.docusign.net/.../accounts",
method: "GET",
headers: a!httpHeader("name", a!scsField("httpvalue", "value", false)),
queryParameters: a!httpQueryParameter("IntegratorKey", a!scsField("integratorkey", "integrator", false)),
basicAuthenticationCredentials: a!httpAuthenticationBasic(a!scsField("Rishu_Username", "Username", false()),
a!scsField("Rishu_Password", "Password", false()),true())
)

Can anyone guide where I am getting it wrong?

Thanks
Rishu

OriginalPostID-243720

  Discussion posts and replies are publicly visible

Parents
  • Okay, I took a look at a process model I have that does this. In my case we were using the status parameter instead of the envelopeId, but maybe it will help. Here's what we had. Some of this was in separate rules (and I would recommend that) but I'm putting the expressions to make it easier for you to try.

    headers: {a!httpHeader(name: "Content-Type", value: "application/json"), a!httpHeader(name: "X-DocuSign-Authentication", value: a!toJson(
    {
    Username: <Your username>,
    Password: your password,
    IntegratorKey: <Your key>
    }
    ))}

    query parameters:
    {a!httpQueryParameter(name: "from_Date", value: rule!getDateToCheckForNewDocuSignUpdates()), a!httpQueryParameter(name: "status", value: {"declined", "completed"})}

    Request body was empty.

    rule!getDateToCheckForNewDocuSignUpdates():

    /* search based on the last time the update process should have run */
    text(
    /* make sure it's in utc */
    gmt(
    datetime(
    year(
    now()
    ),
    month(
    now()
    ),
    day(
    now()
    ),
    hour(
    now()
    ),
    minute(
    now()
    ) - 30
    ))
    /*needs to be ISO 8601 format */,
    "yyyy-MM-ddTHH:mm:ss") & ".000Z"


    That will tell DocuSign to look for envelopes updated to declined or completed in the last 30 minutes
Reply
  • Okay, I took a look at a process model I have that does this. In my case we were using the status parameter instead of the envelopeId, but maybe it will help. Here's what we had. Some of this was in separate rules (and I would recommend that) but I'm putting the expressions to make it easier for you to try.

    headers: {a!httpHeader(name: "Content-Type", value: "application/json"), a!httpHeader(name: "X-DocuSign-Authentication", value: a!toJson(
    {
    Username: <Your username>,
    Password: your password,
    IntegratorKey: <Your key>
    }
    ))}

    query parameters:
    {a!httpQueryParameter(name: "from_Date", value: rule!getDateToCheckForNewDocuSignUpdates()), a!httpQueryParameter(name: "status", value: {"declined", "completed"})}

    Request body was empty.

    rule!getDateToCheckForNewDocuSignUpdates():

    /* search based on the last time the update process should have run */
    text(
    /* make sure it's in utc */
    gmt(
    datetime(
    year(
    now()
    ),
    month(
    now()
    ),
    day(
    now()
    ),
    hour(
    now()
    ),
    minute(
    now()
    ) - 30
    ))
    /*needs to be ISO 8601 format */,
    "yyyy-MM-ddTHH:mm:ss") & ".000Z"


    That will tell DocuSign to look for envelopes updated to declined or completed in the last 30 minutes
Children
No Data