Back to Docs

Authentication API

Neubot uses JSON Web Tokens (JWT) for API authentication. This allows you to securely access protected endpoints from your applications.

Authentication Flow

To obtain an API token for a user, you must initiate an OAuth2 login flow with Neubot.

  1. Redirect the user to the Neubot App Login endpoint with your detailed callback URL.
  2. The user signs in with their preferred provider (Google/GitHub).
  3. Neubot redirects the user back to your callbackURL with a token parameter appended (or replacing [TOKEN]).

Endpoints

GET Initiate App Login

Starts the authentication process.

https://neubot.joshattic.us/login/app/

Parameters

Parameter Type Required Description
callbackURL string Yes The URL to redirect the user to after successful login. You must include a [TOKEN] placeholder which will be replaced by the actual JWT.

Example

https://neubot.joshattic.us/login/app/?callbackURL=https://myapp.com/callback?token=[TOKEN]

Using the Token

Once you have the token, you must include it in the headers of your API requests.

Headers

Header Value Format Description
Authorization Bearer <your_token> Standard Bearer token authentication (Preferred).

Example Request

curl -X POST https://neubot.joshattic.us/api/query \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1..." \
  -H "Content-Type: application/json" \
  -d '{"query": "Hello"}'