Frayit Developer API
    Frayit Developer API
    • Exchange authorization code for access token
      POST
    • Fetch logged-in player profile (OAuth2 + client_secret header)
      GET
    • Fetch player by Frayit ID (Client Credentials)
      GET
    • Submit an anti-cheat report
      POST
    • Submit a toxicity report
      POST
    • Submit an AFK report
      POST
    • Submit a griefing report
      POST
    • Schemas
      • Schemas
        • ErrorResponse
        • Evidence
        • AnticheatReport
        • ToxicityReport
        • AfkReport
        • GriefingReport
        • Reportoffense
        • ReportSubmitResponse
        • PlayerPublic
        • PlayerDetailed
        • TokenRequest
        • TokenResponse

      Exchange authorization code for access token

      POST
      https://api.frayit.com/v1/oauth/token
      Last modified:2025-08-31 23:14:43
      Implements OAuth2 authorization_code grant. Issues a short-lived JWT access token for accessing player resources. Secret validation is performed with the game's client_secret.

      Request

      Body Params application/json

      Examples

      Responses

      🟢200OK
      application/json
      Access token response
      Body

      🟠400Bad Request
      🟠401Unauthorized
      🔴500Server Error
      Request Request Example
      Shell
      JavaScript
      Java
      Swift
      curl --location --request POST 'https://api.frayit.com/v1/oauth/token' \
      --header 'Content-Type: application/json' \
      --data-raw '{
          "grant_type": "authorization_code",
          "code": "abc123authcode",
          "client_id": "your-client-id",
          "client_secret": "your-client-secret"
      }'
      Response Response Example
      200 - Example 1
      {
          "access_token": "jwt-token-string",
          "token_type": "Bearer",
          "expires_in": 3600
      }
      Modified at 2025-08-31 23:14:43
      Next
      Fetch logged-in player profile (OAuth2 + client_secret header)
      Built with