A basic API for your OSSN website, allow you to integrate OSSN into your application.
Clone or download
Latest commit c76f914 Sep 2, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
actions Ossn web service v5.0 development Aug 27, 2018
classes Update OssnServices.php Aug 28, 2018
locale Ossn web service v5.0 development Aug 27, 2018
plugins/default Ossn web service v5.0 development Aug 27, 2018
README.md Read Me Sep 2, 2018
ossn_com.php Ossn web service v5.0 development Aug 27, 2018
ossn_com.xml Ossn web service v5.0 development Aug 27, 2018

README.md

OssnServices

A basic API for your OSSN website, which allows you to integrate OSSN into your applications. This is a initial version and will be improved in the future. This component is introduced in OSSN v5.0 and requires minimum OSSN v5.0

  • You can get a Users basic details like
    • First Name
    • Last Name
    • Email
    • Gender
    • Birthdate
  • Get users friends
  • User Authentication (by username and password)
    • Username can be email

Basic Usage

User Details

CURL https://www.mywebsite.com/api/v1.0/user_details?api_key_token=<my_api_key_token>&guid=<user_guid>

Below is the sample response from the API

{
    "merchant": "Ossn Development",
    "url": "https:\/\/development.opensource-socialnetwork.org\/",
    "time_token": 1535399772,
    "payload": false,
    "code": "100",
    "message": "Request successfully executed",
    "payload": {
        "first_name": "System",
        "last_name": "Administrator",
        "email": "someuser@localhost.com",
        "birthdate": "20\/02\/2000",
        "gender": "male"
    }
}

User Friends

CURL https://www.mywebsite.com/api/v1.0/user_friends?api_key_token=<my_api_key_token>&guid=<user_guid>

User Authentication

CURL https://www.mywebsite.com/api/v1.0/user_authenticate?api_key_token=<my_api_key_token>&username=<user_username>&password=<user_password_in_plaintext>

API CODES

Code Description
100 The requested method successfully responded to the request.
101 Invalid API method.
102 The requested method didn't returned any response.
103 The requested user is invalid.
104 The requested user is not validated.
105 Unable to login. The supplied password is incorrect or system have returned the error.

If you have questions please post them to our community website https://www.opensource-socialnetwork.org/community