UNKNOWN_ENVELOPE_RECIPIENT When making Embedded Signing API Call - salesforce

I am making an API Call to Docusign to try to get a link for a recipient to sign his document without him having to go into his e-mail. I am doing this in APEX in a Visualforce page.
I am sending the following request to the endpoint: "https://demo.docusign.net/restapi/v2/accounts/661863/envelopes/21F02F6C-E156-46E0-BCDE-778D18DB4592/views/recipient"
My Request is:
{
"authenticationMethod": "email",
"email": "test#outlook.com",
"returnUrl": "www.docusign.net",
"userName": "LB -1 Demo 2"
}
The response I am getting is:
{
"errorCode": "UNKNOWN_ENVELOPE_RECIPIENT",
"message": "The recipient you have identified is not a valid recipient of the specified envelope. Envelope recipient could not be determined. 'clientUserId', 'email', or 'userName' in request and envelope may not match."
}
The envelope request is:
{
"signers": [
{
"name": "LB -1 Demo 2",
"email": "test#outlook.com",
"recipientId": "1",
"requireIdLookup": "false",
"userId": "05b324da-8ebb-4d4b-a58b-0ef019530214",
"routingOrder": "1",
"roleName": "Signer 1",
"status": "completed",
"signedDateTime": "2014-06-24T11:30:09.4630000Z",
"deliveredDateTime": "2014-06-24T11:29:58.5100000Z"
}
],
"agents": [],
"editors": [],
"intermediaries": [],
"carbonCopies": [],
"certifiedDeliveries": [],
"inPersonSigners": [],
"recipientCount": "1",
"currentRoutingOrder": "1"
}
The recipient information seems to match my request but the API call is still not working. Is this because I am missing a clientUserId and that is required for am embedded signing call? And if so, would I need to create the Envelope AND Recipients AND ONLY THEN can I make the embedded signer call?

This question is a duplicate, please search the DocuSignApi tag for existing answers before posting new questions. As Andrew has mentioned, this is a duplicate of this question:
Docusign Embedded Signing
You need to set the clientUserId property for any recipient who you want to be an embedded recipient. It's up to you what value to use, but make sure you include the same exact value when requesting the signing URL token.
There's also a detailed explanation of this on the DocuSign Developer Center under Features -> Embedding
https://www.docusign.com/developer-center/explore/features/embedding-docusign

Related

React - Discord authentication with Auth0

I am using Auth0 to authenticate with discord.
The authentication works great with Google and returns a user class filled with information such as username and email. However, when using discord I am returned the below JSON which only has the nickname, name, and picture which are either empty or default.
{
"nickname": "",
"name": "",
"picture": "https://cdn.auth0.com/avatars/default.png",
"locale": "en-US",
"updated_at": "2020-10-31T22:10:50.094Z",
"sub": "oauth2|discord|[REMOVED JUST INCASE]"
}
Here is a picture of the popup login window :

How to update user in auth0 with react?

This is what I have access to from the user:
email_verified
family_name
given_name
name
nickname
picture
sub
updated_at
The api wants an id /api/v2/users/{id}. I tried using the sub but it did not work. How do I get access to the user id? Or what else do I pass in?
When creating a user by posting to /api/v2/users the response contains the user_id as a field. The response you get looks e.g. like this:
{
"email": "john.doe#gmail.com",
"email_verified": false,
"username": "johndoe",
"phone_number": "+199999999999999",
"phone_verified": false,
"user_id": "usr_5457edea1b8f33391a000004", <-- this is the user id
"created_at": "",
"updated_at": "",
"identities": [
{
"connection": "Initial-Connection",
"user_id": "5457edea1b8f22891a000004",
"provider": "auth0",
"isSocial": false
}
],
"app_metadata": {},
"user_metadata": {},
"picture": "",
"name": "",
"nickname": "",
"multifactor": [
""
],
"last_ip": "",
"last_login": "",
"logins_count": 0,
"blocked": false,
"given_name": "",
"family_name": ""
}
You need that id in order to request user data via /api/v2/users/{id}.
If you don't the user_id you can try to get it via the /api/v2/users-by-email endpoint. The information you have according to your question is not enough. What happened to the other information?
EDIT:
What if I am using the lock widget to create users? How can I access
their id , and if not how can I update their information?
You can't create users using the lock widget. The user is registered on a social platform like facebook or google. The lock widget does only authenticate them via that platform any gives you some information about them which you of course can't edit because you do not own that data

Discord Webhooks and JSON construct limits for non-OAuth apps

I'm trying to clarify whether or not it's possible to POST JSON to a Discord channel webhook, without requiring a fully fledged OAuth authenticated app, and have it display more than a single line of text.
I can successfully send data to the webhook endpoint (using PowerShell), but it will ignore any fields other than 'content'. I was hoping to be able to post an Embed object, which comes from the Execute Webhook documentation, but it just seems to ignore it.
The JSON is like so:
{
"content": "Hi. I'm a robot.",
"embed": {
"title":"This is a title",
"type":"Rich",
"description":"This is a description",
"url":"http://www.google.com",
"fields": [
{
"name":"field1",
"value": "some value",
"inline": "true"
},
{
"name":"field2",
"value": "another value",
"inline": "true"
}
]
}
}
Thank you.

Describe api for google people contact/gmail contact using client library

I want details about fields of gmail contact. Using that, i want to create a form a like what is being shown in gmail contact creation page . I could get describe for salesforce contact. i need same for google contact. i give a sample format for lastName
{
"label": "Last Name",
"name": "LastName",
"type": "string",
"createable": true,
"updateable": true,
"custom": false,
"validations": {
"required": true,
"maxlength": 80
},
"scale": 0,
"precision": 0,
"fields": []
}
is there any possible to get this?
The discovery service api describes all of the google apis you can probably get the information from that programmaticlly or you could just check the documentation
You can also check the documentation directly.
Link to People v1 discovery doc

Facebook Messenger API: What's Does a Quick Reply Payload Do?

If I send Facebook quick reply JSON like the following:
"quick_replies":[
{"content_type":"text","payload":"RED","title":"Red"},
{"content_type":"text","payload":"BLUE","title":"Blue"},
{"content_type":"text","payload":"GREEN","title":"Special"},
]
and the user picks the "Special" reply, I get back
{"recipient_id":5555,"text":"Special"}
I thought the whole point of the payload field was to provide a value other than the title which would be sent back, but it seems like Facebook just sends the title of the selected reply, which begs the question ... what's the point of the payload field?
Yes - you are right you should have so a response with the payload.
As you can see in here:
https://developers.facebook.com/docs/messenger-platform/send-api-reference/quick-replies#callback
The response should be:
{
"sender": {
"id": "USER_ID"
},
"recipient": {
"id": "PAGE_ID"
},
"timestamp": 1464990849275,
"message": {
"mid": "mid.1464990849238:b9a22a2bcb1de31773",
"seq": 69,
"text": "Red",
"quick_reply": {
"payload": "DEVELOPER_DEFINED_PAYLOAD_FOR_PICKING_RED"
}
}
}
and as #Keith Coughtrey mentioned you should enable messaging_postbacks permission.

Resources