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
Related
Created Google Smart Home Action.
Implemented device with:
a. deviceType = action.devices.types.SETTOP
b. deviceTrait = action.devices.traits.Channel
Device is successfully discovered and added to Google Home App's Homegraph.
User sends command: "Ok Google, change to ESPN"
Receives the following json in fulfillment URL:
{
"requestId": "[RequestId GUID]",
"inputs": [{
"intent": "action.devices.EXECUTE",
"payload": {
"commands": [{
"devices": [{
"id": "[SettopBox device Id]"
}],
"execution": [{
"command": "action.devices.commands.selectChannel",
"params": {
"channelCode": "espn",
"channelName": "ESPN",
"channelNumber": "206"
}
}]
}]
}
}]
}
Questions:
How does Google Smart Home determine the "channelNumber" value for "ESPN"? The user's command was "Ok Google, change to "ESPN". This does not contain any information about the channel number.
If a provider was set automatically, is there a setting in Google Home or Google Assistant to change this provider?
The number of a channel for the Channel trait is provided in the SYNC request along with any relevant labels.
{
"availableChannels": [
{
"key": "ktvu2",
"names": [
"Fox",
"KTVU"
],
"number": "2"
},
{
"key": "abc1",
"names": [
"ABC",
"ABC East"
],
"number": "4-11"
}
]
}
As shown in the snippet, the channel number comes from the service. This may be up to the developer of the integration how these numbers may be determined, whether from a cable provider or over-the-air. The field is optional, so a service without channel numbers may still work by saying its name.
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
I have an index on AzureSearch similar to this one:
"fields": [
{
"name": "key",
"type": "Edm.String",
"filterable": true,
},
{
"name": "title",
"type": "Edm.String",
"searchable": true
},
{
"name": "followers",
"type": "Collection(Edm.String)",
"filterable": true,
}
]
Here, title is the title of a Post and its text searchable. followers contains the user ids of users who are following that particular Post.
I am getting current logged in userId from session. Now when a user does some text search, I want to show those Posts on top which current user is following.
Please tell if this is achievable in AzureSearch using ScoringProfiles or anything else?
Tag boosting in ScoringProfile does exactly that. All you need to do is to add a scoring profile as below :
{
"scoringProfiles": [
{
"name": "personalized",
"functions": [
{
"type": "tag",
"boost": 2,
"fieldName": "followers",
"tag": { "tagsParameter": "follower" }
}
]
}
]
}
Then, at query time, issue a search query with the scoring profile with the parameters to customize the ranking :
docs?search=some%20post&&scoringProfile=personalized&scoringParameter=follower:user_abc
Hope this helps. You can read more about it here.
https://azure.microsoft.com/en-us/blog/personalizing-search-results-announcing-tag-boosting-in-azure-search/
Nate
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
I have seen this in the Google API's. Is it possible for Cloud Endpoints as well?
https://developers.google.com/apis-explorer/#p/adexchangebuyer/v1.2/adexchangebuyer.accounts.get
It's totally possible. We've had some StackOverflow posts about monkey patching and this would be another prime example.
For example:
How do I specify my own icons so they show up in a Google Endpoints API discovery document?
For this case, the content served at /_ah/spi/BackendService.getApiConfigs contains your API config and the "description" you want here is for a "parameter".
So for example in the method
#endpoints.method(MySchema, MySchema,
path='myschema/{strField}', name='myschema.echo')
def MySchemaEcho(self, request):
return request
the field strField is a path "parameter" and so in the API config we would see
{
...
"methods": {
"myapi.myschema.echo": {
...
"request": {
...
"parameters": {
"strField": {
"required": true,
"type": "string"
}
}
},
...
}
...
}
}
To get your description in there you would need to add it to the dictionary listed under strField so that it reads
"strField": {
"required": true,
"type": "string",
"description": "Most important field that ever was."
}