/createContacts
1 min
POST
http://1.1.1.1/createContacts
contactsarrayis a list of 'Contact' objects (Contact class is defined in apiclient/MpcDriven/Contact.py).
request_extra_dataobjectadditional data for the administrative request
bodyobject
200success
curl --request POST \
--url 'http://1.1.1.1/createContacts?contacts=array&request_extra_data=%22{%5Cn%20%20%5C%22MessageNumber%5C%22%3A%205%2C%5Cn%20%20%5C%22SessionId%5C%22%3A%20%5C%223478593863424051983840947%5C%22%5Cn}%5Cn%22' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"FunctionData": {
"Contacts": [
{
"Name": "contact name",
"Currency": "ETH",
"Address": "0x123",
"AuthorizationType": 1
}
],
"RequestExtraData": {
"MessageNumber": 5,
"SessionId": "3478593863424051983840947"
}
},
"Meta": {
"FunctionName": "createContacts",
"RandomData": "288cd49d4b8bf00e7d6114b78d5668d5581d6b953fafef779133caa844cd4229",
"Destination": "b9cb8afe52f1d52521cf2b62dfe12146156ad5328f83c62c20c7da81b263356a61340de745c858998544c041798b01c2f4fac31bebe52a19280a32cd57d6d374ea",
"Time": "2021-02-07T18:37:46.948Z",
"Source": "048b99461a70a49abe63fd585cb224177a22a92d2e9e4ddfbc0027887bee9d1843388f42a3eb2e740565e115ad8b7981abf59e3b03b771f4b063b53c517d7a9d99",
"AccessToken": "51311c84d2c8fd2fafbe56ceb1fb30a99d3417abfc55769577338ab286798087"
}
}'- NOTE - this function can not be called from Swagger, please use createContactsForSwagger instead.
- Calling this request can be used for reconnect a MPC user to the mobile app while MPC driven is enabled by setting a new mobile app public key
- For completing the reconnect, the mobile should call to "registerMpcUser" after this session approved
- This request will be handled in a separate session that will contain only the "reconnectMpcUserToMobileApp"
- return - success or error response.
- Possible status codes:
0 - Contacts created successfully,
1 - Contact already exists,
2 - Invalid name,
3 - Unknown address group,
4 - Unknown Currency,
5 - Unknown authorization type,
6 - Invalid address,
7 - Duplicate contact,
8 - At most one address group per contact is supported,
9 - Node is currently unavailable,
10 - Smart contract contacts cannot be authorized as internal addresses,
11 - Too many contacts in request