LogoLogo
Go ToJoin the Community
  • Getting Started
    • Introduction
    • How it Works
    • Onboarding
  • Examples
    • Tutorials
      • Hello, World!
      • Image Generation w/ Stable Diffusion
  • CREATE WITH BYTENITE
    • Building Blocks
      • Apps
      • Job Templates
  • SDK
    • ByteNite Dev CLI
  • Launch with ByteNite
    • Data Sources
      • AWS S3
      • Google Cloud Storage
      • Storj
      • HTTP
      • File Upload
      • Temporary Bucket
    • Jobs
  • API Reference
    • Customer API
      • Jobs
        • Create
        • Read
        • Update
        • Manage
        • Other
      • Logs
      • Data Sources
      • Templates
      • Events
    • Authentication API
      • Access Token
      • API Keys
      • Secrets
      • User
    • Developer API
      • Apps
        • Metadata
        • Push
        • Manage
        • Pull
      • Engines
        • Metadata
        • Push
        • Manage
        • Pull
      • Templates
    • Wallet API
      • Balance
      • Transactions
      • Exchange Rate
      • Redeem Coupon
  • GUI
  • Other
    • Glossary
    • Feature Requests
    • Status
Powered by GitBook

© 2025 ByteNite Inc.

On this page

Was this helpful?

Export as PDF
  1. API Reference
  2. Authentication API

Access Token

PreviousAuthentication APINextAPI Keys

Last updated 11 days ago

Was this helpful?

In order to authorize your API calls, you will need an access token. For security, the only way to programmatically obtain an access token is by exchanging it for an API key. Learn how to:




Exchange API key for access token

Check if the user is already logged in

get

Check if the user is already logged in, if the user can skip login a redirect url is returned

Authorizations
Query parameters
loginChallengeanyOptional
Responses
200
A successful response.
400
Returned when the users sends a malformed request.
401
Returned when the user is not authenticated.
403
Returned when the user does not have permission to access the resource.
404
Returned when the resource does not exist.
500
Returned when an error on the server occurred.
503
Returned when the resource is temporarily unavailable.
default
An unexpected error response.
get
GET /v1/auth/skip HTTP/1.1
Host: api.bytenite.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "skip": true,
  "redirectTo": "text"
}
  • POSTExchange API key for access token
  • POSTUser signout
  • GETCheck if the user is already logged in

User signout

post

Log out current user and invalidates token

Authorizations
Body
objectOptional
Responses
200
A successful response.
400
Returned when the users sends a malformed request.
401
Returned when the user is not authenticated.
403
Returned when the user does not have permission to access the resource.
404
Returned when the resource does not exist.
500
Returned when an error on the server occurred.
503
Returned when the resource is temporarily unavailable.
default
An unexpected error response.
post
POST /v1/auth/signout HTTP/1.1
Host: api.bytenite.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 2

{}
{
  "ok": true,
  "requestId": "text",
  "message": "text",
  "error": {
    "code": 1,
    "message": "text",
    "description": "text"
  }
}

Exchange API key for access token

post

Exchange an API key for an oAuth2 access token

Body
apiKeystringRequired

The actual API key that you have received from the API key request.

Example: eyJjcnYiOiJQLTM4NCIsImQiOiJyM1VFQ21naUNiNjI1c19CZWc3emdULUlCajJUOUZW...
Responses
200
A successful response.
400
Returned when the users sends a malformed request.
401
Returned when the user is not authenticated.
403
Returned when the user does not have permission to access the resource.
404
Returned when the resource does not exist.
500
Returned when an error on the server occurred.
503
Returned when the resource is temporarily unavailable.
default
An unexpected error response.
post
POST /v1/auth/access_token HTTP/1.1
Host: api.bytenite.com
Content-Type: application/json
Accept: */*
Content-Length: 84

{
  "apiKey": "eyJjcnYiOiJQLTM4NCIsImQiOiJyM1VFQ21naUNiNjI1c19CZWc3emdULUlCajJUOUZW..."
}
{
  "token": "eyJjcnYiOiJQLTM4NCIsImQiOiJyM1VFQ21naUNiNjI1c19CZWc3emdULUlCajJUOUZW...",
  "expiresIn": "3600",
  "scope": "text"
}
🔐 Get an API key