API Overview
Tips:
The Polygon network for Lens dApps
The Optimistic network for Farcaster dApps
1. API Base Link
Based on the contracts deployed on Polygon Mainnet & Optimistic Mainnet
Based on the contracts deployed on Mumbai Testnet
2. How To Use
For GET Method API
Assume you will use the API GetLensCuratorAccepted. Its route is "/v2/lens/curator/accepted".
The first step you should compose the base link with the API route:
https://api.tako.so/v2/lens/curator/accepted?profileId=36113&cursor=0
Please refer to the API documentation for specific parameters and requirements.
Now, you can request the full link using JavaScript, Python, cURL, etc. Then, you will receive a response from the Tako server.
For POST method API
Like the GET method, you must pass the parameters in the request body as application/json.
3. Rate Limit
The cumulative number of API accesses from the same IP address should not exceed 60 times per minute.
4. Request Format
GET method: All parameters are included in the URL.
POST method: All parameters are formatted as JSON data and put in the request body.
5. Response Format
The response is JSON format. There are four parameters at the top level:
status
data
error_code
error_message
Parameter | Data Type | Visibility | Description |
---|---|---|---|
status | string | Always visible | Indicate whether the API access is successful. |
data | The return value of each API determines it. | Visible only when API access is successful | The return value of API |
error_code | int | Visible only when API access fails | See the table “Error Code” below |
error_message | string | Visible only when API access fails | The reason for the error |
6. Response Example
When API access is successful
When API access fails
7. Error Code
Code | Title | Description |
---|---|---|
1100 | InvalidRequestBody | Invalid Request Body |
1101 | InvalidParameter | Invalid Parameter |
3000 | InvalidAddress | Invalid address |
3001 | VerifyOwnerProofFail | Verify ownerProof fail |
3002 | TimeExpired | Time is expired |
3003 | TimeInvalid | Invalid time |
3004 | DuplicateVote | Duplicate vote |
1000 | InternalSystemError | System Error(1000) |
1001 | DatabaseError | System Busy(1001) |
1002 | RedisError | System Busy(1002) |
1003 | FilesystemError | System Busy(1003) |
1004 | RemoteServiceError | System Busy(1004) |
Last updated