Difference between revisions of "MOR API phonebooks get"
From Kolmisoft Wiki
Jump to navigationJump to search
Line 27: | Line 27: | ||
*** <error>User was not found</error> - User was not found using user_id. Use correct user id. | *** <error>User was not found</error> - User was not found using user_id. Use correct user id. | ||
*** <error>Incorrect hash</error> - Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string. | *** <error>Incorrect hash</error> - Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string. | ||
<br><br> | |||
---- | |||
*Example: | |||
**We have user_id = 123, API Secret Key = 456789 | |||
**Hash string to be converted: "123456789" | |||
**We send: | |||
***/api/phonebooks?u=admin&p=admin&user_id=123&hash=f7c3bc1d808e04732adf679965ccc34ca7ae3441 | |||
'''* Note that username and password are not included in hash''' |
Revision as of 14:15, 22 December 2011
This functionality is available from MOR 11
Phonebooks list
- Call: /api/phonebooks
- Methods: POST, GET(if allowed, not recomended)
- Params:
- user_id - User ID in MOR database, whose phonebooks we want to see. Required.
- u - username to login. Required.
- p - password to login. Required.
- hash - SHA1 hash constructed using user_id and API_Secret_Key ( More described in Constructing hash). Required.
- Returns:
- Success
- <phonebooks> <phonebook> ..... </phonebook> </phonebooks>
- Success
- Errors:
- <error>No Phonebooks</error> - User does not have phonebooks.
- <error>User was not found</error> - User was not found using user_id. Use correct user id.
- <error>Incorrect hash</error> - Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.
- Errors:
- Example:
- We have user_id = 123, API Secret Key = 456789
- Hash string to be converted: "123456789"
- We send:
- /api/phonebooks?u=admin&p=admin&user_id=123&hash=f7c3bc1d808e04732adf679965ccc34ca7ae3441
* Note that username and password are not included in hash