In ejabberd api, i can fill user,nick,room, but how can i fill the nodes? Is there any example. Thank you.
POST /api/subscribe_room
{
"user": "aaaaa",
"nick": "bbbbb",
"room": "ccccc",
"nodes": "ddddd"
}
HTTP/1.1 200 OK
[
"aaaaa",
"bbbbb"
]
My example :
{
"user":"muuser",
"nick":"ccccdd",
"room":"myRoom",
"nodes": ["urn:xmpp:mucsub:nodes:presence","urn:xmpp:mucsub:nodes:messages","urn:xmpp:mucsub:nodes:affiliations","urn:xmpp:mucsub:nodes:subject", "urn:xmpp:mucsub:nodes:config","urn:xmpp:mucsub:nodes:system"]
}
as explained here
nodes attribute is filled like so :
nodes : "urn:xmpp:mucsub:nodes:messages,urn:xmpp:mucsub:nodes:affiliations"
Related
I was using identity verification feature from Docusign with envelopes. Previously, envelopes are working fine without it. Then I enabled this feature and searched on the Docusign API Documentation, how to implement this feature. I got the necessary details like authentication token, workflow id. Try to hit the endpoint using Post request. Everything's fine but having issues in the body part of the post request getting invalid phone number response. Thank you for your time! Please help!
//Post request endpoint
https://demo.docusign.net/restapi/v2.1/accounts/f8594d59-9d52-xxxx-xxxx-xxxxxxxxxxxx/envelopes
//header
Authorization: Bearer {accestoken}
Content-Type: application/json
Acces: application/json
//request body
{
"accountId": "f8594d59-9d52-xxxx-xxxx-xxxxxxxxxxxx",
"templateId": "4e2ba389-5d26-xxxx-xxxx-xxxxxxxxxxxx",
"emailSubject": "Please sign the contract",
"templateRoles": [
{
"roleName": "Sender",
"name": "Name",
"email": "fName.lName#xyz.com",
"identityVerification": {
"workflowId": "c368e411-1592-xxxx-xxxx-xxxxxxxxxxxx",
"steps": null,
"inputOptions": [
{
"name": "phone_number_list",
"valueType": "PhoneNumberList",
"phoneNumberList": [
{
"countryCode": "1",
"number": "8956324511"
}
]
}
]
}
},
{
"roleName": "Customer",
"name": "cFName",
"email": "cFName.cLName#gmail.com"
}
],
"status": "sent"
}
//Response
{
"errorCode": "PHONE_NUMBER_INVALID",
"message": "Phone number is not valid."
}
//Expected Response can vary
{
"envelopeId": "e8342cd0-ea2b-xxxx-xxxx-xxxxxxxxxx",
"uri": "/envelopes/e8342cd0-ea2b-xxxx-xxxx-xxxxxxxxxx",
"statusDateTime": "2023-01-13T05:22:35.0100000Z",
"status": "sent"
}
According to https://www.areacodehelp.com/where/area_code_895.shtml area code 895 is not valid.
Try with a valid phone number to confirm the issue, but to me it looks like the number you used here is indeed not a valid phone number.
PS
If you meant to use a number in Azerbaijan, you need to change the country code from "1" to "895" as it's a country code for a different country (the way you have is if for the USA)
So, basically what I found is ID verification won't work with template roles because of the syntax compatibility. But it will work with composite templates, I made it work with composite template.
Additionally, both of the methods are compatible idVerification or phoneAuthentication. I am using idVerification for the first Signer and phone Authentication for the second signer
Docusign docs have more methods as well like sms auth, etc. Explore it from these links:
https://developers.docusign.com/docs/esign-rest-api/how-to/phone-auth/
https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopes/create/
Check examples, in my usecase I explored Generic JSON Request/Response
Thanks for all the support from Inbar and the community!
{
"accountId": "f8594d59-9d52-xxxx-xxxx-xxxxxxxxxx",
"emailSubject": "Please sign the contract",
"status": "sent",
"compositeTemplates": [
{
"compositeTemplateId": "1",
"serverTemplates": [
{
"sequence": "1",
"templateId": "4e2ba389-5d26-xxxx-xxxx-xxxxxxxxxx"
}
],
"inlineTemplates": [
{
"sequence": "2",
"recipients": {
"signers": [
{
"roleName": "Sender",
"recipientId": "1",
"name": "Name",
"email": "fName.lName#xyz.com",
"identityVerification": {
"workflowId": "c368e411-1592-xxxx-xxxx-xxxxxxxxxx",
"steps": null,
"inputOptions": [
{
"name": "phone_number_list",
"valueType": "PhoneNumberList",
"phoneNumberList": [
{
"countryCode": "1",
"number": "1234567890"
}
]
}
]
}
},
{
"roleName": "Customer",
"recipientId": "2",
"name": "cName",
"email": "cfName.clName#gmail.com",
"phoneAuthentication": {
"senderProvidedNumbers": [
"+11234567890"
],
"recipMayProvideNumber": false
},
"idCheckConfigurationName": "Phone Auth $"
}
]
}
}
]
}
]
}
Note: Use valid phone number!
I am using the following SDK to search for and purchase flights via Amadeus:
https://github.com/autotune/amadeus/pull/1/files
This was a previously abandoned project I have decided to take on and make work. As part of that project I am trying to purchase a ticket in the sandbox environment and getting the following error:
{
"errors": [
{
"code": 477,
"title": "INVALID FORMAT",
"detail": "carrier code is a 2 or 3 alphanum except YY and YYY",
"source": {
"pointer": "/data/flightOffers[0]/itineraries[1]/segments[0]/operating/carrierCode",
"example": "AF"
},
"status": 400
}
]
}
Here is the json data being sent:
{
"type": "flight-order",
"travelers": [
{
"id": "1",
"dateOfBirth": "1990-02-15",
"name": {
"firstName": "Foo",
"lastName": "Bar"
},
"gender": "MALE",
"contact": {
"emailAddress": "foo#bar.com",
"phones": [
{
"deviceType": "MOBILE",
"countryCallingCode": "33",
"number": "5555555555"
}
]
}
}
],
"ticketingAgreement": {
"option": "DELAY_TO_CANCEL",
"delay": "6D"
},
"remarks": {},
"operating": {
"carrierCode": "UA"
}
}
Any help appreciated!
The error suggests that the sent payload is invalid. I'd advice you use a tool like Curl or Postman to verify you're using the right API documentation, before debugging actual code.
After further reading your PR and checking the API reference at :
https://developers.amadeus.com/self-service/category/air/api-doc/flight-create-orders/api-reference
I think you need to confirm that the Carrier code being passed is available in the segments under:
flightOffers > itineraries > segments
Although the API reference doesn't have operating > carrierCode like you used in the data sent, my guess after seeing the API error response you shared is that they are performing a check against the flight offers passed.
I suggest you check the results gotten when you call the flightOffers and also add it to the payload sent to the sandbox.
I have to find the nearest node (the id) of a geo-spatial point in OpenStreetMap
i can use the official demo api
https://router.project-osrm.org/nearest/v1/foot/13.388860,52.517037
and i have this very nice output:
/ 20170831155106
// https://router.project-osrm.org/nearest/v1/foot/13.388860,52.517037
{
"waypoints": [
{
"hint": "DB0KgLNSo4oUAAAAIAAAAAcAAAAAAAAACgAAABAAAAAEAAAAAAAAAK7aAAAATMwAqVghAzxMzACtWCEDAQAPAN1tFXI=",
"distance": 4.085341,
"location": [
13.3888,
52.517033
],
"name": "Friedrichstraße"
}
],
"code": "Ok"
}
but the din't give me the nearest OSM node id and i can't use "?annotations=true" because i recive this message
https://router.project-osrm.org/nearest/v1/foot/13.388860,52.51703713.388860,52.517037?annotations=true
{'code': 'InvalidQuery',
'message': 'Query string malformed close to position 37'}
thanks to all for help!
This feature is currently being worked on. The PR looks good, but needs some fixes around the edges.
Try like this..
Example- http://router.project-osrm.org/nearest/v1/driving/79.887810,7.005145?number=3&bearings=90,100
Output-
{
"waypoints": [
{
"nodes": [
2264199819,
2045820592
],
"hint": "5c34iGPO-IgIAAAADgAAAAMAAAAAAAAAeOI0QY6li0FoZYRAAAAAAAgAAAAOAAAAAwAAAAAAAADxpQAAAEzMAKlYIQM8TMwArVghAwEA3wrB8JPr",
"distance": 4.096695475190991,
"name": "Friedrichstraße",
"location": [
13.3888,
52.517033
]
}
],
"code": "Ok"
}
We are trying to remove "doc" field which gets added on top of original document by Couchbase while doing XDCR.
For example:
Below is our sample original document :-
{
"UserID": "User1",
"FirstName": "First",
"LastName": "Last",
"Roles":
[
{
"RoleID" : "1",
"RoleName": "R_1"
}
]
}
But when we do XDCR from Couchbase to ElasticSearch, Couchbase adds "doc" field which holds the original document. Below is the sample document created by Couchbase XDCR :-
{
"doc":
{
"UserID": "User1",
"FirstName": "First",
"LastName": "Last",
"Roles":
[
{
"RoleID" : "1",
"RoleName": "R_1"
}
]
}
}
Is there a way to remove this "doc" field?
Thanks,
Sameer
Not in the current implementation - it's hardcoded. You can open a feature request to make it configurable, so it will be added in the next release.
I'm POST'ing the following JSON to asana's "tasks" endpoint.
{
"data": {
"options": {
"fields": [
"name",
"notes"
]
},
"workspace": <valid number>,
"assignee": <valid number>
}
}
It's giving me a "Invalid field" error every time. I've read through the API a few times now and this JOSN looks exactly how the API says it should. Any ideas?
Asana API for those of you who want to help out: Asana API Documentation
(I work for Asana)
The "options" field is a sibling of the "data" field, not a child. This is mentioned in the docs, but perhaps we aren't providing clarifying examples to make it more obvious.
If you change your request to look like this:
{
"options": {
"fields": [
"name",
"notes"
]
},
"data": {
"workspace": <valid number>,
"assignee": <valid number>
}
}
things should work.