Quest Protocol
  • Introduction
    • Welcome to Quest Protocol
    • Integrate & Partner with Quest
    • Use Cases
      • Creator Platforms
      • Gaming
      • NFT Marketplaces
      • Social Media DApps
      • DeFi
  • QUEST PLATFORM
    • Creating a Campaign
    • Audience Overview
    • User Profile
    • Discover Page
    • Perk Store
    • Integrations
    • Memberships
    • Segmentation & Targetting
    • AI Insights
  • QUEST PROTOCOL - SDKs & APIs
    • UI SDK Components
      • Embedded XP Points
      • Embedded in-dApp Guides
      • Embedded Web3 Search
      • Embedded Quests
    • Quest SDKs & APIs
      • User
      • Entity
      • Badge
      • Campaign
      • App Metric
      • Membership Card
      • Entity Tag
      • Membership Tier
      • Skill
      • Entity Credit Tier
      • Gem
      • Custom Reward
      • Entity Gem
      • Entity Alert
      • Entity Feature Flag
      • Entity Data contract
      • Entity Authentication Token
      • Event Metric Mapping
    • Data Engine
  • Website
  • Quest Thesis
Powered by GitBook
On this page
  1. QUEST PROTOCOL - SDKs & APIs
  2. Quest SDKs & APIs

Entity Authentication Token

PreviousEntity Data contractNextEvent Metric Mapping

Last updated 1 year ago

Get Authentication Token

get

Get the authentication token for a user in a specific entity.

Path parameters
entityIdstringRequired

The ID of the entity.

userIdstringRequired

The ID of the user.

Header parameters
apikeystringRequired

The API key for authentication

Example: test
useridstringRequired

The Id of the user performing the request.

Example: dummy-userid
tokenstringRequired

The token for user authentication.

Example: dummy-token
Responses
200
Successful operation
application/json
400
Invalid request
application/json
404
Token not found
application/json
500
Server error
application/json
get
GET /api/entities/{entityId}/users/{userId}/authentication-token HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
userid: dummy-userid
token: dummy-token
Accept: */*
{
  "success": true,
  "authenticationToken": "text"
}

Create Authentication Token

post

Create an authentication token for a user in a specific entity.

Path parameters
entityIdstringRequired

The ID of the entity.

userIdstringRequired

The ID of the user.

Header parameters
apikeystringRequired

The API key for authentication

Example: test
useridstringRequired

The Id of the user performing the request.

Example: dummy-userid
tokenstringRequired

The token for user authentication.

Example: dummy-token
Responses
201
Successful operation
application/json
400
Invalid request
application/json
500
Server error
application/json
post
POST /api/entities/{entityId}/users/{userId}/authentication-token HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
userid: dummy-userid
token: dummy-token
Accept: */*
{
  "success": true
}

Delete Authentication Token

delete

Delete the authentication token for a user in a specific entity.

Path parameters
entityIdstringRequired

The ID of the entity.

userIdstringRequired

The ID of the user.

Header parameters
apikeystringRequired

The API key for authentication

Example: test
useridstringRequired

The Id of the user performing the request.

Example: dummy-userid
tokenstringRequired

The token for user authentication.

Example: dummy-token
Responses
200
Successful operation
application/json
400
Invalid request
application/json
500
Server error
application/json
delete
DELETE /api/entities/{entityId}/users/{userId}/authentication-token HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
userid: dummy-userid
token: dummy-token
Accept: */*
{
  "success": true
}
  • GETGet Authentication Token
  • POSTCreate Authentication Token
  • DELETEDelete Authentication Token
  • PATCHUpdate Authentication Token
  • POSTRefresh Authentication Token

Update Authentication Token

patch

Update the authentication token for a user in a specific entity.

Path parameters
entityIdstringRequired

The ID of the entity.

userIdstringRequired

The ID of the user.

Header parameters
apikeystringRequired

The API key for authentication

Example: test
useridstringRequired

The Id of the user performing the request.

Example: dummy-userid
tokenstringRequired

The token for user authentication.

Example: dummy-token
Body
expirystring ยท date-timeOptional

The new expiry date for the token.

flagsstring[]Optional

Any new flags for the token.

Responses
200
Successful operation
application/json
400
Invalid request
application/json
500
Server error
application/json
patch
PATCH /api/entities/{entityId}/users/{userId}/authentication-token HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
userid: dummy-userid
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 69

{
  "expiry": "2023-12-31T23:59:59Z",
  "flags": [
    "new_flag_1",
    "new_flag_2"
  ]
}
{
  "success": true
}

Refresh Authentication Token

post

Refresh the authentication token for a user in a specific entity.

Path parameters
entityIdstringRequired

The ID of the entity.

userIdstringRequired

The ID of the user.

Header parameters
apikeystringRequired

The API key for authentication

Example: test
useridstringRequired

The Id of the user performing the request.

Example: dummy-userid
tokenstringRequired

The token for user authentication.

Example: dummy-token
Body
authenticationTokenstringOptional

The current authentication token to refresh.

Responses
200
Successful operation
application/json
400
Invalid request
application/json
500
Server error
application/json
post
POST /api/entities/{entityId}/users/{userId}/authentication-token/refresh HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
userid: dummy-userid
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 45

{
  "authenticationToken": "current_token_value"
}
{
  "success": true
}