This API is developed using the PHP Slim Framework, In this api you can use thease feature.
- Create an account (An email verification will be sent to user email address when they rgistered an account)
- Login into account (User can login into their account when they will successfully verified their account)
- Send Email Verification Code (You can add a feature that user can send email verifcation code again to their email address)
- Update Password (User can update password, An email will also be send when they succesfully changed their password)
To use this project's feature, you need to make changes only in Constants.php
file, and that's it.
Set your database connection's information.
//Database Connection
define('DB_NAME', 'socialcodia'); //your database username
define('DB_USER', 'root'); //your database name
define('DB_PASS', ''); //your database password
define('DB_HOST', 'localhost'); //your database host name
And you also need to make change in website section of Constants.php
file.
//Website Information
define('WEBSITE_DOMAIN', 'http://api.socialcodia.ml'); //your domain name
define('WEBSITE_EMAIL', '[email protected]'); //your email address
define('WEBSITE_EMAIL_PASSWORD', 'password'); //your email password
define('WEBSITE_EMAIL_FROM', 'Social Codia'); // your website name here
define('WEBSITE_NAME', 'Social Codia'); //your website name here
define('WEBSITE_OWNER_NAME', 'Umair Farooqui'); //your name, we will send this name with email verification mail.
To Create An Account, Accept only post request with three parameter
- Name
- Password
The end point is to Create or Register an accout is createUser
Full Demo Url http://api.socialcodia.ml/createUser
An email verification will be send to user email address when they registered an account into the system.
In verification email the verification link will be like this.
http://api.socialcodia.ml/verifyEmail/wdpWwmufazmit4Py2aYd7MsocialcodiavknYY3bKxS7okyO9NgpYTmufazmiTGsocialcodiaE=/$2y$10$GWEv1cnJo2YdGbmo4mrwA.LNsocialcodiai4sj8.EdxIZuyWX3fjRHEiBrBX2S
- Domain Name : (
http://api.socialcodia.ml/
) - End Point (
verifyEmail
) - Encypted User Email (
wdpWwmufazmit4Py2aYd7MsocialcodiavknYY3bKxS7okyO9NgpYTmufazmiTGsocialcodiaE=
) - Encypted Code (
$2y$10$GWEv1cnJo2YdGbmo4mrwA.LNsocialcodiai4sj8.EdxIZuyWX3fjRHEiBrBX2S
)
Full Demo Url http://api.socialcodia.ml/verifyEmail/wdpWwmufazmit4Py2aYd7MsocialcodiavknYY3bKxS7okyO9NgpYTmufazmiTGsocialcodiaE=/$2y$10$GWEv1cnJo2YdGbmo4mrwA.LNsocialcodiai4sj8.EdxIZuyWX3fjRHEiBrBX2S
To Send The Email Verification Code again, Accept only post request with only one parameter
User can make the send email verification link code if there email address is not verified yet.
The end point of send email verification code is updatePassword
Full Demo Url http://api.socialcodia.ml/updatePassword
To Login into Account, Accept only post request with two parameter
- Password
The end point of login is login
Full Demo Url http://api.socialcodia.ml/login
To update or changed the current password, Accept only post request with three parameter
- Password
- newPassword
The end point of update password is updatePassword
Full Demo Url http://api.socialcodia.ml/updatePassword
an verification code will be sent to user email address when they successfull updated their password.
you don't need to worry about that things, you need to change the code in Constants.php
Php
That's it! Now go build something cool.