- Allows you to authenticate via Twitter
- Authorizes the app via Twitter oauth tokens
- Account registration to the app itself. Routes used
API | Method | Response | Description |
---|---|---|---|
/register |
POST | {message: string, authtoken: string} |
Registration endpoint. An authtoken is returned, use the authtoken to authenticate requests |
/login |
POST | {message: string, authtoken: string} |
Login endpoint. Allows registered used to login-into the app |
/api/v1//auth/twitter/reverse |
POST | Twitter request_token endpoint. | |
/auth/twitter |
POST | Twitter oauth_verifier to get oauth_token |
- Clone app
git clone https://github.com/iyerrama27/twitter-backend.git
- Change directory into the app and install dependencies
npm install
- Start the app
npm start
-
Test registration endpoint (ex. postman client) API endpoint: http://localhost:{port}/register Method: POST Body: { username: string, password: string, } Returns an authtoken, which can be used to authenticate subsequent calls
-
Test login endpoint (ex. postman client) API endpoint: http://localhost:{port}/login Method: POST Body: { username: string, password: string, } Returns an authtoken, which can be used to authenticate subsequent calls
-
Twitter authentication API endpoint: http://localhost:{port}/api/v1/auth/twitter/reverse Method: POST