# Naija Emoji RESTful API 😎
A RESTful emoji service that lets you add, find, update and delete emojis with authentication
[![Software License][ico-license]](
github.com)
**TIA**
###API Root
The Naija Emoji APi is accesible throgh the url
```bash
naijaemoji-staging.herokuap…
```
The default root returns the following JSON message.
```json
{
"message": "welcome to the naija-emoji RESTful Api"
}
```
Missing required fields return
```json
{
"message": "Missing some required fields"
}
```
**Attach the token as a header with key `token` to authenticated routes**
Invalid authenticated paths (without token header) returns
```json
{
"message": "No token provided."
}
```
Invalid authenticated paths (with invalid token) returns
```json
{
"message": "invalid token."
}
```
###Auth Register User | POST /auth/register
Pass a username, and password to `
naijaemoji-staging.herokuap…`
A succesful registration returns
```json
{
"message": "User successfully registered."
}
```
Double registration will return
```json
{
"message": "User already exists."
}
```
###Auth Register User | POST /auth/login
Pass a username, and password to `
naijaemoji-staging.herokuap…`
succesful authentication returns a success message and 24 hour token
```json
{
"message": "login successful",
"token": "313064bdcbf72cbf050e0c5bfae44a91682fd42fa1e88df705b1f183a94b6580"
}
```
**The token will be passed as a header for all authenticated tokens**
Login with invalid credentials returns an error message
```json
{
"message": "Invalid login credentials."
}
```
###Auth Logout user | GET /auth/logout
Route: `
naijaemoji-staging.herokuap…`
Succesful logout returns
```json
{
"message": "successfully logged out."
}
```
###Add new emoji | POST /emojis
Route: `
naijaemoji-staging.herokuap…`
Successfully added emoji returns
```json
{
"message": "Emoji …