Last updated 17 days ago
Was this helpful?
Require an email with an OTP code that could be used to obtain an ID token
/signin
curl -L \ --request POST \ --url 'http://api.bytenite.com/v1/auth/signin' \ --header 'Authorization: YOUR_API_KEY' \ --header 'Content-Type: application/json' \ --data '{"email":"text","firstName":"text","lastName":"text"}'
{ "ok": true, "sentAt": "2025-02-22T05:17:35.165Z", "expireAt": "2025-02-22T05:17:35.165Z", "nonce": "text" }
Validate the OTP code to authenticate the user
/authenticate
curl -L \ --request POST \ --url 'http://api.bytenite.com/v1/auth/authenticate' \ --header 'Authorization: YOUR_API_KEY' \ --header 'Content-Type: application/json'
{ "redirectTo": "text" }
Exchange the OTP code for an API key that could be used for authentication
/api_key
curl -L \ --request POST \ --url 'http://api.bytenite.com/v1/auth/api_key' \ --header 'Authorization: YOUR_API_KEY' \ --header 'Content-Type: application/json'
{ "token": "text", "apiKey": { "id": "text", "name": "text", "issuedAt": "2025-02-22T05:17:35.165Z", "expiresAt": "2025-02-22T05:17:35.165Z", "userId": "text", "revoked": true, "fingerprint": "text" } }
Exchange an API key for an oAuth2 access token
/access_token
curl -L \ --request POST \ --url 'http://api.bytenite.com/v1/auth/access_token' \ --header 'Authorization: YOUR_API_KEY' \ --header 'Content-Type: application/json'
{ "token": "text", "expiresIn": "text", "scope": "text" }
Log out current user and invalidates token
/signout
curl -L \ --request POST \ --url 'http://api.bytenite.com/v1/auth/signout' \ --header 'Authorization: YOUR_API_KEY' \ --header 'Content-Type: application/json'
{ "ok": true, "requestId": "text", "message": "text", "error": { "code": 1, "message": "text", "description": "text" } }
Check if the user is already logged in, if the user can skip login a redirect url is returned
/skip
curl -L \ --url 'http://api.bytenite.com/v1/auth/skip' \ --header 'Authorization: YOUR_API_KEY'
{ "skip": true, "redirectTo": "text" }