sms authentication with API REST using templateRoles - docusignapi

I'm trying to send a document using a template with the API REST.
I'm using templateRoles in my JSON and i send the name and the mail of the signer who has the rolename defined in the template.
So i have this part of request :
"templateId":"894848C-26A8-44B4-B08D-D9140B70EB1A",
"templateRoles":[
{
"roleName":"CUSTOMER_SIGNER",
"name":"Test",
"email":"test#test.com",
}
]
Now, i want to use sms authentication for my role CUSTOMER_SIGNER.
But in the doc of REST API, there no option for that.
I have try on the model of send a document without template :
"templateId":"894848C-26A8-44B4-B08D-D9140B70EB1A",
"templateRoles":[
{
"roleName":"CUSTOMER_SIGNER",
"name":"Test",
"email":"test#test.com",
"smsAuthentication":{
"senderProvidedNumbers":[
"+00202156511"
]
},
"requireIdLookup":"true",
"idCheckConfigurationName":"SMS Auth $",
"phoneAuthentication":{
"recipMayProvideNumber":"true"
}
}
]
without success. I don't recieve anything.
Have you an idea to make this?

Related

Microsoft Teams bot finding message sender id

We have built a teams app that can be used in the group chat. So, basically any user can do
#
At the server side, we want to get the sending user and respond to the sent text based on who sent it. The code to get users in the conversation looks like below:
const connector = context.adapter.createConnectorClient(context.activity.serviceUrl);
const response = await connector.conversations.getConversationMembers(context.activity.conversation.id);
functions.logger.log("conversation members are:", response)
The response returns an array of all the users in the conversation with below structure
[
{
"id": "29:1a-Xb7uPrMwC2XqjMEHCC7ytV2xb2VUCqTA-n_s-k5ZyMCTKIL-ku2XkgbE167D_5ZbmVaqQxJGIQ13vypSqu-A",
"name": "Neeti Sharma",
"objectId": "718ab805-860c-43ec-8d4e-4af0c543df75",
"givenName": "Neeti",
"surname": "Sharma",
"email": "xxx#xxxx.xxx",
"userPrincipalName": "xxxx#xxxx.xxx",
"tenantId": "xxx-xx-xx-xxxxxx-x",
"userRole": "user"
},
{
...
}
]
The above response does not indicate who is the sender of the message in the group chat. How do we find that?
I'm not sure the exact syntax for Node (I work mostly in C#), but basically on the context.activity object there is a from property (i.e. context.activity.from), which is of type ChannelAccount (DotNet reference here, but it's very similar for Node). That will give you, at least, Name and AadObjectId. What you're using right now is getConversationMembers, which gives you everyone in the entire Channel, not just that particular message/thread.
turnContext.Activity.From.Id is also unique to each user. You can use that property too. Email is tough to get in any other events than the MembersAdded event.

Sharepoint Online - UserId.NameId

Hi I have problem with get correct NameId from sharepoint Online.
When I try to get it by CSOM I receive correct guid: user.AadObjectId.NameId (00af4ea3-3f02-4857-abe2-357dd6ccceb2)
but when I request by REST I receive
"UserId": {
"__metadata": {
"type": "SP.UserIdInfo"
},
"NameId": "10030000ae7b8efb",
"NameIdIssuer": "urn:federation:microsoftonline"
}
How can I get correct NameId as Guid by REST API?
Using REST API below.
/_api/web/siteusers/getbyid(25)?$select=AadObjectId

DocuSign API - RecipientView - How do you specify Excluded Documents?

From https://developers.docusign.com/esign-rest-api/reference/Envelopes/EnvelopeRecipients I can see that when creating an Envelope Recipient, you can specify a list of documents within the DocuSign envelope that the Envelope Recipient cannot view.
I want to use similar functionality when creating a recipient view request (ie. https://developers.docusign.com/esign-rest-api/reference/Envelopes/EnvelopeViews/createRecipient#recipientViewRequest). Specifically, when creating a recipient view request I want to specify which documents the viewer can see/not see. However, I do not see an ExcludedDocuments parameter or similar.
How can I
The RecipientView is simply the API method for obtaining an URL to a Signing Ceremony for a particular recipient.
If you don't want a recipient to see a document, then you must use Document Visibility--that includes using the excludedDocuments attribute, but other attributes and tabs need to be set up too.
Once you have an envelope with document visibility set up for some/all of the recipients, you can use RecipientView to obtain the URL for a specific recipient's signing ceremony.
Larry's response above is correct.
To set the document visibility for a specific recipient you could use this API endpoint:
PUT {vx}/accounts/{accountid}/envelopes/{envelopeid}/recipients/{recipientid}/document_visibility
this is the information that you can set in the request body
{
"documentVisibility": [
{
"recipientId": "sample string 1",
"documentId": "sample string 2",
"visible": "sample string 3",
"rights": "sample string 4"
}
]
}
so it could be something like this:
{
"documentVisibility": [{
"documentId": 1,
"visible": false
}]
}
I hope this helps!

Access the context variables stored in watson conversation using node.js

I want to access the context variables saved in watson conversation JSON through an APP using node.js.
I have tried saving the whole conversation log into cloudant and fetched it from there.
Is there a easier way to access the context variables? I am thinking of sending a http request to server to fetch the right variables (I dont know which variables to access).
Depending on your needs you can store context in the browser session. This is what the conversation-simple app does.. https://github.com/watson-developer-cloud/conversation-simple
In this case the JSON context object is passed down to the browser, and passed back up again with subsequent requests.
The alternative is to store this info in a custom store such as Cloudant
The response that one get from Conversation service is in JSON format. So you can take out any context value that are available in the "context" param of this JSON response. Following is a simple response from the Conversation service.
{
"intents": [],
"entities": [],
"input": {
"text": ""
},
"output": {
"text": ["Hello MJ! How can I help you today?"],
"nodes_visited": ["Conversation Start"],
"log_messages": []
},
"context": {
"username": "MJ",
"conversation_id": "5835fa3b-6a1c-4ec5-92f9-22844684670e",
"system": {
"dialog_stack": [{
"dialog_node": "Conversation Start"
}],
"dialog_turn_counter": 1,
"dialog_request_counter": 1,
"_node_output_map": {
"Conversation Start": [0]
}
}
}
}
You will have all your context variables in the context key of the response. If you check the context parameter of this response you will see the "username": "MJ" entry. This is a custom value that I have added to the service context. You can format this response and use it in your application as per your need.

Ember.js data records shows content: null in relationships inspector

I have the following code in my 'user.js' model in ember-data:
export default DS.Model.extend({
organization: DS.belongsTo('organization'),
//other stuff
});
The CRUD for the website is working as expected, and in MongoDB I can see the following for the organization field of User:
"organization" : ObjectId("571974742ce868d575b79d6a"),
BUT, and I'm not sure if this is an error in my code or me not understanding how Ember-data works, I cannot access that ID from a model hook like so:
model(){
return this.store.findRecord("user", this.get("session.currentUser.id"))
.then(user => this.store.findRecord("location", {organization: user.organization}));
}
And if I go to the Ember inspector to observe the belongsTo attribute of the User object, I see:
organization: <(subclass of Ember.ObjectProxy):ember956>
But clicking through I see content: null
What am I doing wrong? Could it be a server-side error?
Edit including JSON response from server for the above findRecord("user") call:
{
"links":{
"self":"/users/5719749a2ce868d575b79d6b"
},
"included":[
{
"type":"organizations",
"id":"571974742ce868d575b79d6a",
"links":{
"self":"/organizations/571974742ce868d575b79d6a"
},
"attributes":{
"creation-date":"2016-04-22T00:46:44.779Z"
}
}
],
"jsonapi":{
"version":"1.0"
},
"data":{
"type":"users",
"id":"5719749a2ce868d575b79d6b",
"links":{
"self":"/users/5719749a2ce868d575b79d6b"
},
"attributes":{
"email":"danthwa#gmail.com",
"first-name":"Daniel",
"last-name":"Thompson",
"registration-date":"2016-04-22T00:47:22.534Z"
},
"relationships":{
"organization":{
"type":"organizations",
"id":"571974742ce868d575b79d6a"
}
}
}
}
Confirmed. As stated by Kingpin2k,
the relationships isn't being built up correctly, I think the type and id inside of organization need to be within a data object.
This applies to Ember sites expecting a JSON API spec payload, meaning they have been configured to use JSONAPISerializer for incoming payloads.

Resources