Skip to content

Webservices

Thomas Ochman edited this page Oct 2, 2013 · 9 revisions

Oxwall Messenger uses a set of webservices that access the Oxwall DB.

Login

Method: GET /login.php

Parameters: username, password*

Example: http://yourdomain.com/webservice/login.php?username=username&password=password*

Response:

{
 success: "1",
 message: "Login successful!",
 userid: "xxxx",
}

*encrypted with your Oxwall DB salt and sha256

User

Method: GET /user.php

Parameters: userid

Example: http://yourdomain.com/webservice/user.php?id=xxxxxx

Response:

{
user: "yourusername",
realname: "Real Name",
email: "[email protected]",
member_since: "March 26, 2013",
sex: "male",
birth: "January 24, 1968",
age: 41,
big_avatar: "http://yourdomain.com/ow_userfiles/plugins/base/avatars/avatar_big_xxxx_xxxxxxxx.jpg",
small_avatar: "http://yourdomain.com/ow_userfiles/plugins/base/avatars/avatar_xxxx_xxxxxxxx.jpg",
profiletext: "Users profile text"
}

Conversations

Method: GET /inbox_conversations.php

Parameters: user

Example: http://yourdomain.com/webservice/inbox_conversations.php?user=xxxxxx

Response:

{
success: 1,
message: "Conversations exist!",
conversationcount: 5,
conversations: [
{
conversationid: "xx",
startedbyid: "xxxxxx",
startedby: "Real Name",
sentto: "xxxxxx",
title: "Subject in conversation 1",
messages: "http://yourdomain.com/webservice/inbox_messages.php?conversation=53"
},
{
conversationid: "xx",
startedbyid: "xxxxxx",
startedby: "Real Name",
sentto: "xxxxxx",
title: "Subject in conversation 2",
messages: "http://yourdomain.com/webservice/inbox_messages.php?conversation=53"
},
{
conversationid: "xx",
startedbyid: "xxxxxx",
startedby: "Real Name",
sentto: "xxxxxx",
title: "Subject in conversation 3",
messages: "http://yourdomain.com/webservice/inbox_messages.php?conversation=53"
}
]
}

Messages

Method: GET /inbox_messages.php

Parameters: conversationId

Example: http://yourdomain.com/webservice/inbox_messages.php?conversationId=xxxxxx

Response:

{
success: 1,
message: "Messages exist!",
conversationId: null,
countmessagesinconversation: 2,
messagesinconversation: [
{
messageid: "xxx",
messagecreated: "October 01, 2013 20:07",
sentbyID: "2",
sentby: "Real Name",
title: "Test message",
message: "I'm just starting a conversation by sending a first message."
},
{
messageid: "xxx",
messagecreated: "October 01, 2013 20:14",
sentbyID: "1",
sentby: "Real Name",
title: "Test message",
message: "And I'm replying to myself but from another account and this time I'm using Oxwall Messenger for iOS. :-) - sent with OxwallMessenger"
}
]
}
Clone this wiki locally