Authentication

Authentication

This API enables you to manage all aspects of your LinearFox account. Authentication methods

  • API Key - Create and manage access tokens for your account.
  • OAuth 2.0 Bearer Token - Authenticate with a bearer token.

Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.

POST /v1/auth/login (Create a new token "Login to Linear Fox Account")

Parameters:

nametypedata typedescription
usernamerequiredstringUsername of the user
emailNot requiredstringEmail of the user
passwordrequiredstringPassword of the user
rememberMeNot requiredbooleanCreate a token for 30 days (Not recommend)

Responses:

http codecontent-typeresponse
200application/json{"code":"200","Successfully logged in!"}
400application/json{"code":"400","message":"Username or email and password are incorrect"}
400application/json{"code":"400","You are already logged in"}
405text/html;None

Example cURL

 curl --location --request POST 'https://api.linearfox.com/v1/auth/login' \
      --header 'Content-Type: application/x-www-form-urlencoded' \
      --data-urlencode 'username=' \
      --data-urlencode 'password='
GET /v1/auth/token (GET token information)

Authorization required: OAuth 2.0 Bearer Token or API Key

Responses:

http codecontent-typeresponse
200application/json{"message": "Success", "authData" {} }
401application/json{"message": "Unauthorized & No token provided"}

Example cURL

   curl --location --request GET 'https://api.linearfox.com/v1/auth/token' \
   --header 'Authorization: Bearer [TOKEN]'