Waffle API
  1. Authentication
Waffle API
  • Overview
  • Authentication
    • Get access token
      POST
    • Refresh token
      POST
    • Revoke token
      POST
  • Game
    • List games
      GET
    • Get loyalty program by ID
      GET
    • Create new game
      POST
    • Update game by ID
      PUT
    • Delete game by ID
      DELETE
  • Ticket
  • Game Account
    • List game accounts
      GET
    • Get game account by ID
      GET
    • Search game accounts
      POST
  • Report
  • Game Service
    • Gen Token
      POST
    • Login
      POST
    • List games
      GET
    • Verify Session
      GET
  1. Authentication

Get access token

Developing
Develop Env
https://dev.your-api-server.com
Develop Env
https://dev.your-api-server.com
POST
https://dev.your-api-server.com
/v1/auth/token
Last modified:2024-05-21 07:30:47
OperationId:token

Request

Header Params
Content-Type
string 
required
Example:
application/json
Body Params application/json
clientId
string 
required
clientSecret
string 
required
emailPassword
object 
optional
username
string 
required
password
string 
required
credential
object 
optional
objectRef
string 
required
Example
{
    "clientId": "string",
    "clientSecret": "string",
    "emailPassword": {
        "username": "string",
        "password": "string"
    },
    "credential": {
        "objectRef": "string"
    }
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://dev.your-api-server.com/v1/auth/token' \
--header 'Content-Type: application/json' \
--data-raw '{
    "clientId": "string",
    "clientSecret": "string",
    "emailPassword": {
        "username": "string",
        "password": "string"
    },
    "credential": {
        "objectRef": "string"
    }
}'

Responses

🟢200Success
application/json
Body
accessToken
string 
required
Example "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
tokenType
string 
required
Bearer
expiresIn
integer 
required
In seconds
Example
{
    "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
    "token_type": "Bearer",
    "expires_in": 3600
}
🟠401Unauthorized
🔴500Internal Server Error
Modified at 2024-05-21 07:30:47
Previous
Authentication
Next
Refresh token
Built with