Authentication

Facebook-login

Logging users in with facebook

POST /api/login/facebook

The body should look like this:

{"token": "token_acquired_from_facebook"}

the response will look like this:

{"token": "2G5K7KBUeKpjSyz1PWmfV36hr83O0NoAIf7dqXz4DaDl"}

Which is the token required for NTHU ION’s API

You should then put the token in the header for other requests, for example:

GET /api/private/content HTTP/1.1
Authorization: Token 2G5K7KBUeKpjSyz1PWmfV36hr83O0NoAIf7dqXz4DaDl
Status Codes:

Logout

Revokes the current token

POST /api/logout