Tako Protocol
  • What is Tako?
  • Social Abstract Account
  • Social Legos
    • On-Chain Reputation
    • Farcaster
  • Monetization
    • Profile as an asset
      • Introduction
      • API Overview
      • For Farcaster dApp
        • Deployed Contract Address
        • Contract Specification
          • ProfileMarketV1
          • FarcasterKey
        • APIs
          • GetBuyPrice
          • GetBuyPriceAfterFee
          • GetSellPrice
          • GetSellPriceAfterFee
          • Discover
          • Explore
          • GetCommentsOnFarcaster
          • GetCommentsOnLens
          • GetHolders
          • GetAssets
          • GetProfileAndKey
          • GetActivated
          • GetHoldersByAddress
          • GetHoldingByAddress
          • GetKeyInfo
          • GetTrending
          • GetTrendingVolume
          • GetTradesLatest
          • GetTradesList
          • GetClaimable
    • Open Curation
      • Introduction
      • API Overview
      • For Lens dApp
        • Deployed Contract Address
        • Contract Specification
          • Enums and Structs
          • Owner Functions
          • Governance Functions
          • Bid Functions
          • Curate Functions
          • View Functions
        • APIs
          • GetWhitelistInfo
          • CheckOnchainTX
          • getOpenCurationCuratorAccepted
          • getOpenCurationBidsCreated
          • getOpenCurationBidsConfirmingCreated
          • getOpenCurationBidsPassed
          • getOpenCurationRecentActiveCurators
          • GetBidsFeed
          • verifyOpenCurationBid
          • getOpenCurationBidsCreatedStats
          • getOpenCurationCuratorLastBidPrice
          • registerOpenCuration
          • getOpenCurationIdIndexPairs
        • SDK
          • Installing the SDK
          • allBids
          • takoHubInfo()
          • generateBidAbiData()
          • generateBidBatchAbiData()
          • estimateGas()
          • generateTransaction()
          • register()
          • verifyBid()
          • generateClaimRewardAbiData()
          • curatorStatus()
    • Peer-to-Peer Curation
      • Introduction
      • API Overview
      • For Lens dApp
        • Deployed Contract Address
        • Contract Specification
          • Enums and Structs
          • Owner Functions
          • Governance Functions
          • Bid Functions
          • Curate Functions
          • View Functions
        • APIs
          • GetToken
          • RefreshToken
          • GetWhitelistInfo
          • SearchProfile
          • CheckOnchainTX
          • GetRecentActiveCurators
          • ActiveStatistics
          • GetLensCuratorAccepted
          • GetLensBidsCreated
          • GetLensBidsReceived
          • GetLensBidsConfirmingCreated
          • GetLensBidsConfirmingReceived
          • VerifyLensBid
          • IgnoreLensBid
          • GetLensBidsIgnored
          • GetLensBidsCreatedStats
          • GetLensBidsReceivedStats
          • GetLensCuratorLastBidPrice
          • GetLensPubIndexPairs
          • GetLensPubIds
      • For Farcaster dApp
        • Deployed Contract Address
        • Contract Specification
          • Enums and Structs
          • Owner Functions
          • Governance Functions
          • Bid Functions
          • Curate Functions
          • View Functions
        • APIs
          • GetToken
          • RefreshToken
          • GetWhitelistInfo
          • SearchProfile
          • CheckOnchainTX
          • GetRecentActiveCurators
          • ActiveStatistics
          • GetFarcasterCuratorAccepted
          • GetFarcasterBidsCreated
          • GetFarcasterBidsReceived
          • GetFarcasterBidsConfirmingReceived
          • VerifyFarcasterBid
          • IgnoreFarcasterBid
          • GetFarcasterBidsIgnored
          • GetFarcasterBidsCreatedStats
          • GetFarcasterBidsReceivedStats
          • GetFarcasterCuratorLastBidPrice
          • GetFarcasterEngagement
          • GetFarcasterPubIndexPairs
  • Links
    • Github
    • Twitter
    • Brand kit
Powered by GitBook
On this page
  • API
  • Request Parameters
  • Parameter Content Type
  • Request and Response Example
  • Request
  • Response
  1. Monetization
  2. Peer-to-Peer Curation
  3. For Farcaster dApp
  4. APIs

GetToken

API

Property
Value

API

/v2/token

Title

GetToken

Description

Sign in Tako

Method

POST

Request Parameters

Name
Type
Required
Description

message

string

YES

Format:

\nACCOUNT:\n{EVM-compatible Address}\nISSUED AT:\n{Time in RFC3339 format}\n\n

NOTE: The message structure above must be included, additional content can be added at the beginning and end of the message.

For example:

Tako wants you to sign in with your Ethereum account.\n\nThis request will not trigger a blockchain transaction or cost any gas fees.\n\nACCOUNT:\n0x4DD3DB5d0B9aAf0B0a2fBD37a489d2f0e3F234A9\n\nISSUED AT:\n2023-08-01T10:29:31.000Z\n

What looks like on the user’s wallet signing page, such as Metamask:

Tako wants you to sign in with your Ethereum account.

This request will not trigger a blockchain transaction or cost any gas fees.

ACCOUNT:

0x4DD3DB5d0B9aAf0B0a2fBD37a489d2f0e3F234A9

ISSUED AT:

2023-08-01T10:29:31.000Z

signature

string

YES

Elliptic curve signing of the message.

Parameter Content Type

application/json

Request and Response Example

Request

cURL Code

curl -X 'POST' \
  'https://api.tako.so/v2/token' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
    "message": "Tako wants you to sign in with your Ethereum account.\n\nThis request will not trigger a blockchain transaction or cost any gas fees.\n\nACCOUNT:\n0x4DD3DB5d0B9aAf0B0a2fBD37a489d2f0e3F234A9\n\nISSUED AT:\n2023-08-01T10:29:31.000Z\n\n",
    "signature": "0xa480712751eea94815608cd58a153b6380608d2b79439d9033eb936f9a23ef8445c59b3f60f76b0b411e67798e0a3c92750fda60fc15699cf5f247d3f3435ce31b"
  }'

Request URL

https://api.tako.so/v2/token

Response

NOTE: The token is the only credential to access APIs, so you must save it securely. Its validity period is 3600 seconds. You can use the refresh_token to refresh the token. Its validity period is 86400 seconds.

{
  "status": "success",
  "data": {
    "token_type": "Bearer",
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHg0REQzREI1ZDBCOWFBZjBCMGEyZkJEMzdhNDg5ZDJmMGUzRjIzNEE5IiwidHlwZSI6InRva2VuIiwiZXhwIjoxNjkwOTYzNDQ3fQ.VeRSLf-8sEb6nsdieGBuJI8wktCyJPKzTLx-opCX7x4",
    "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHg0REQzREI1ZDBCOWFBZjBCMGEyZkJEMzdhNDg5ZDJmMGUzRjIzNEE5IiwidHlwZSI6InJlZnJlc2hfdG9rZW4iLCJleHAiOjE2OTEwNDYyNDd9.ghFd7X-FHnYW16VWyi-75tzEh5L_r06vjAIo3kKcGKM",
    "expires_in": 3600
  }
}
PreviousAPIsNextRefreshToken

Last updated 1 year ago