parameter [extensionId] issue - ringcentral

I am getting following:
"errorCode" : "CMN-102", "message" : "Resource for parameter [extensionId] is not found"
in password flow. I tried to find the reason but was not able to. What is wrong here?

This is because you are not giving correct extension id number. You can get all the id numbers for all your extensions with this API
GET https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/~
It will return response with account id number and extension id number. example:
"uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/account/123456789/extension/987654321";,
account id number will be 123456789 and extension id number will be 987654321
Check this ref: https://community.ringcentral.com/questions/89517/c-resource-for-parameter-extensionid-is-not-found.html

Related

How to provide updateMask during Google People update contact?

If I need to update the name or address of a contact, giving the field as "names, addresses" works.
How do I need to give the updateMask to update a specific field like "middleName" alone.
Providing updateMask as "names.middleName" does not work and throws the following error:
{
"error": {
"code": 400,
"message": "Invalid updatePersonFields mask path: \"names.middle_name\". Valid paths are documented at https://developers.google.com/people/api/rest/v1/people/updateContact.",
"status": "INVALID_ARGUMENT"
}
}
Anyone help?
Answer:
You need to use names as updatePersonFields, but all names need to be specified. This may be a bug, as linked below, but it is also not clear from the documentation.
More Information:
It is possible this is a bug, though until a response is obtained from the issue tracker report (which I assume was you -but if not - hit the star to help it gain more attention) about this it is not possible to know for sure.
While FieldMasks do accept sub-fields, these are not specified on the updatePersonFields documentation page, only the broader names.
You can see the list of definitely supported fields here under the Query Parameters.
Current Workaround:
While waiting for Google to respond to the bug report, the only way you can get around this is by using the names field mask, but also including the firstName and lastName parameters too when making the patch:
{
"names": [
{
"givenName": "Rafa",
"middleName": "Guillermo",
"familyName": "Rocks"
}
],
"etag": "%XxXXXx00XxxXXXXXXxXXXX00XXXXXXxXxxX0"
}
Remember: If you leave out any of these fields this is tantamount to replacing it with empty string - so be careful!

Not getting extension id with Error CMN-102

I continuously getting the following issue when trying call the Presence API:
{
"errorCode":"CMN-102",
"message":"Resource for parameter [extensionId] is not found",
"errors": [
{
"errorCode":"CMN-102","message":"Resource for parameter [extensionId] is not found",
"parameterName":"extensionId"
}
],
"parameterName":"extensionId"
}
What will be the reason? How to fix? Finding difficult to get the extension id here.
This happens when you are not giving the correct extension id number in the API. You first need to get all the id numbers for all your extensions with this API
GET https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/~
It will return a response with account id number and extension id number.
example:
"uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/account/123456789/extension/987654321";,
So account id number will be 123456789 and extension id number will be 987654321

stackdriver Request contains an invalid argument

I'm studying about Google Cloud Platform.
In this stackdriver projects.groups.members.list I'm trying to get member's list in stackdriver's group.
when I command this code in above link,I get this error.
GET https://monitoring.googleapis.com/v3/projects/{my_project}/groups/{my_group}/members?key={YOUR_API_KEY}
error :
{
"error": {
"code": 400,
"message": "Request contains an invalid argument.",
"status": "INVALID_ARGUMENT"
}
}
my_project and my_group is correct, and there is no other argument, is there any problem?
I found that {my_group} is not alphabetical string like my_group,
but integer string like 12345678956.
in this projects.groups.list you can find your group_id by excuting APIs Explorer.

How do I send an accessCode to a recipient and override the email using a template via the DocuSignAPI?

I have tried just about everything that I can think of and cannot get this to work.
I am trying to set an access code in my code and send it to a templateRole using the RequestSignatureFromTemplate call. Right now, all of my configuration info is in XML. I am NOT adverse to using JSON but not all of my developers know JSON.
Here is a snippet of my XML.
<envelopeDefinition xmlns=\"http://www.docusign.com/restapi\">
accountId>12345</accountId>
<status>sent</status>
<emailSubject>Test Form</emailSubject>
<emailBlurb>This is a template test.</emailBlurb>
<templateId>####-########</templateId>
<templateRoles>
<templateRole>
<accessCode>AccessCode124</accessCode>" +
<addAccessCodeToEmail>true</addAccessCodeToEmail>" +
<email>jevans#eclarifire.com</email>
<name>Test User</name>
<roleName>RoleOne</roleName>
<emailNotification>
<emailSubject>This is RoleOne's subject</emailSubject>
<emailBody>This is RoleOne's email.</emailBody>
<addAccessCodeToEmail>true</addAccessCodeToEmail>
</emailNotification>
</templateRole>
<templateRole>
<accessCode>AccessCode246</accessCode>
<email>jevans#eclarifire.com</email>
<name>Test User2</name>
<roleName>RoleTwo</roleName>
<emailNotification>
<emailBody>Your access code is 24680</emailBody>
</emailNotification>
</templateRole>
</templateRoles>
</envelopeDefinition>
You'll notice that I have two different implementations in the templateRole nodes. This is intentional since I'm trying everything that I can think of. In templateRole(1), I have added the addAccessCodeToEmail node in two different places and it doesn't work in either. I have also attempted to override the emailBlurb node in templateRole(1) and it doesn't work either.
I've been through the documentation and it says that you should be able to add anything that the Recipients format follows but I can't get it to work.
Any one got any ideas?
I've never used the addAccessCodeToEmail property in a "Create/Send Envelope" API request, because including the Access Code in the email that the recipient receives entirely nullifies the effect of using Access Code for authentication in the first place. i.e., the entire point of requiring the Recipient to enter an Access Code is to add another layer of assurance -- beyond the fact that someone merely has access to an email inbox -- before granting access to the envelope. If you're going to include the access code in the email that the Recipient receives, then using Access Code as the form of authentication isn't providing any additional security benefit whatsoever -- whoever has access to that email inbox will be able to easily access the envelope (same result as if you don't use Access Code at all).
That being said, there is a property that (for whatever reason) should allow you to have Access Code included in the email that the recipient receives -- I can't get this to work either. Maybe a bug, but someone at DocuSign will need to confirm. According to the documentation, this should result in the email containing the access code:
POST https://{{env}}.docusign.net/restapi/{{version}}/accounts/{{acctId}}/envelopes
{
"status" : "sent",
"emailBlurb" : "please sign",
"emailSubject" : "Please sign your document",
"templateId" : "TEMPLATE_ID",
"templateRoles" : [{
"name" : "John Doe",
"email" : "JohnsEmail#outlook.com",
"roleName" : "Signer1",
"accessCode" : "1234",
"addAccessCodeToEmail": "true"
}]
}
This request results in the recipient being required to enter an Access Code before he can access the Envelope, but the addAccessCodeToEmail property isn't having the expected effect, as the Access Code doesn't appear anywhere in the email that the recipient receives.
Alternative Approach (Best Practice):
Instead of adding the plain-text access code to the email, best practice when using the API to create/send an Envelope and require Access Code as the form of recipient authentication would be to do the following:
Programmatically set accessCode using a piece of data that your application knows about the recipient.
Set the "Email Blurb" (i.e., body of the email) to provide a hint as to the Access Code.
For example, let's say your application knows the Recipient's social security number. When you make the "Create Envelope" API request:
Set the value of accessCode to the last 4 digits of the Recipient's SSN.
Set the value of emailBlurb to include the messaging "Your access code is the last 4 digits of your SSN."
Doing things this way is much more secure than simply including the Access Code (in plain text) in the Email itself.
Finally, regarding your question about overriding the email subject & body for recipients -- see definition of emailNotification property on page 290-291 of the REST API guide (http://www.docusign.com/sites/default/files/REST_API_Guide_v2.pdf):
IMPORTANT: If this is enabled for one recipient, it overrides the Envelope Subject and EmailBlurb. Also, you must enable emailNotification for all recipients.
Sounds like you need to set emailNotification for each and every recipient if you want it to have any effect.
Here are a couple of examples that use "Composite Templates" in the Create Envelope API request to create an envelope with either ID Check or Phone Authentication as the method of recipient authentication.
Recipient Authentication = ID Check
POST https://{{env}}.docusign.net/restapi/{{version}}/accounts/{{acctId}}/envelopes
{
"emailSubject": "Please sign",
"emailBlurb": "Please sign...thanks!",
"status": "sent",
"compositeTemplates": [
{
"serverTemplates": [
{
"sequence" : 1,
"templateId": "TEMPLATE_ID"
}],
"inlineTemplates": [
{
"sequence" : 2,
"recipients": {
"signers" : [{
"email": "SallysEmail#outlook.com",
"name": "Sally Adamson",
"recipientId": "1",
"roleName": "ROLE_NAME",
"requireIdLookup": "true",
"idCheckConfigurationName": "ID Check $"
}]
}
}]
}]
}
Recipient Authentication = Phone Auth
POST https://{{env}}.docusign.net/restapi/{{version}}/accounts/{{acctId}}/envelopes
{
"emailSubject": "Please sign",
"emailBlurb": "Please sign...thanks!",
"status": "sent",
"compositeTemplates": [
{
"serverTemplates": [
{
"sequence" : 1,
"templateId": "TEMPLATE_ID"
}],
"inlineTemplates": [
{
"sequence" : 2,
"recipients": {
"signers" : [{
"email": "SallysEmail#outlook.com",
"name": "Sally Adamson",
"recipientId": "1",
"roleName": "ROLE_NAME",
"requireIdLookup": "true",
"idCheckConfigurationName": "Phone Auth $",
"phoneAuthentication": {
"recipMayProvideNumber": "false",
"senderProvidedNumbers": ["206-444-5555"]
}
}]
}
}]
}]
}

Understanding id returned by Facebook search

If in a web browser I enter:
https://graph.facebook.com/search?q=watermelon
the data returned begins:
{
"data": [
{
"id": "100000079215099_345415575486050",
"from": {
"name": "Synthia Stephen",
"id": "100000079215099"
},
My question relates to the id field. The value returned contains two numbers separated by an underscore character.
1) I believe the first number (100000079215099) is the id of a facebook user, is this always the case?
2) What does the second number (345415575486050) represent?
3) Once I have the full id (100000079215099_345415575486050) is it possible to use this id in another Facebook Graph API to retrieve the data associated with this id? If so, what would that url look like?
On facebook Evry user has ID and every event associated with it may be a status or photo also has an ID.
100000079215099_345415575486050
The first part of it represents the user id and second part represents the Event(Activity like a status or post) Id.
To Understand Better go to https://developers.facebook.com/graph-academy
Answers to your question:
1) First one will always be user id.
2) Mentioned above this is specific event related id. (Status or pic)
3) Yes, you can use this id everywhere in other APIs.
1) Yes the first number is the ID.
2) I'm not sure, I think it may be something to track where the view came from and who the viewer is. Perhaps an access token.
3) https://graph.facebook.com/100000079215099
https://graph.facebook.com/100000079215099_49874987249823749283
{
"error": {
"message": "(#803) Some of the aliases you requested do not exist: 100000079215099_49874987249823749283",
"type": "OAuthException"
}
}
https://graph.facebook.com/100000079215099_345415575486052
false
https://graph.facebook.com/100000079215099
returns her data, but I'm omitting it