Authentication

From Kazle API

Jump to: navigation, search

Authenticating users for your Applications is the starting point for developing any login based applications. The authentication process is extremely simple and to stay logged in, you only have to store one 32-bit session key to send with each request as well as the other required arguments.

The authentication process is as follows:

  1. You start by sending a REST request to auth.get_token, this will return a 32-bit string, which you will use to link the logging in user to your application.
  2. Using the auth_token fetched in step 1, you then redirect the user to http://api.kazle.com/login.php with the auth_token parameter sent along with the default parameters.
  3. Once the user successfully logs into their account, they will be sent back to your application by the specified callback_url along with a session_token parameter in the query string.
  4. Using the session_token parameter you have, make a request to auth.get_session, which will fetch and return the session details such as; the session_key, expire time and the user's id.
  5. And that's all, you store the session_token for the user and send it along with each authenticated request you make.
Personal tools