Hướng dẫn nhà phát triển
Tài liệu hướng dẫn API
Hướng
dẫn sử dụng dịch vụ API
- Hướng dẫn sử dụng dịch vụ API hiệu quả trên 👉 Hệ sinh thái Funny Dev
Log in to the system
- Đăng nhập vào hệ thống tại 👉 Hệ sinh thái Funny Dev
Tips
- Nếu bạn chưa có tài khoản, vui lòng đăng ký tài khoản tại đây: funnydev.vn/auth/sign-up
- Hướng dẫn chi tiết đăng ký tài khoản
Getting started
Overview
- An API key is required for requests to be processed by the system. Once a user registers, an API key is automatically generated for this user. The API key must be sent with each request (see full example below). If the API key is not sent or is expired, there will be an error. Please make sure to keep your API key secret to prevent abuse.
Rate Limit
- Our API has a rate limiter to safeguard against spike in requests to maximize its stability. Our rate limiter is currently caped at 30 requests per 1 minute.
- Several headers will be sent alongside the response and these can be examined to determine various information about the request.
X-RateLimit-Limit: 300
X-RateLimit-Remaining: 300
X-RateLimit-Reset: TIMESTAMP
Response Handling
- All API response are returned in JSON format by default. To convert this into usable data, the appropriate function will need to be used according to the language. In Laravel, the function json_decode() can be used to convert the data to either an object (default) or an array (set the second parameter to true). It is very important to check the error key as that provides information on whether there was an error or not. You can also check the header code.
{
"error": 1,
"message": "An error occurred"
}
Check IP
IP Quality
- https://www.funnydev.vn/public_api/checkip
- To get information on the IP, you can send a request to this endpoint and it will return data.
Laravel
use Illuminate\Support\Facades\Http;
Http::timeout(1)->post("https://www.funnydev.vn/public_api/checkip",[
"api_key" => "string",
"ip" => "string",
"mode" => "string",
]);
Server
response
{
"query": "127.0.0.1",
"status": true,
"recommend": true,
"trustable": {
"mobile": false,
"proxy": false,
"username": "sampleuser",
"total_server": 1,
"blacklist": 0%,
"fraud_score": 0,
}
"location": {
"continent": "Asia",
"continentCode": "AS",
"country": "Vietnam",
"countryCode": "VN",
"region": "13",
"regionName": "Tinh Quang Ninh",
"city": "Uong Bi",
"district": "",
"zip": "",
"lat": 21.0339,
"lon": 106.7634,
"ipapi_timezone": "Asia/Ho_Chi_Minh",
"maxmind_timezone": "Asia/Ho_Chi_Minh",
"offset": 25200,
"currency": "VND",
}
"dns": {
"isp": "Vietnam Internet Network Information Center",
"org": "",
"as": "AS18403 FPT Telecom Company",
"asname": "FPT-AS-AP",
}
}
Check Email
Email Validator
- https://www.funnydev.vn/public_api/checkemail
- Check information and validator your email live or die. And the quality of email you got!
Server
response
{
"query": "you@gmail.com",
"status": true
"recommend": true
"trustable": {
"exist": true,
"checkpoint": false,
"disposable": false,
"total_server": 1,
"blacklist": 0%,
"fraud_score": 0,
"suspicious": false,
"domain_type": "popular",
"domain_trust": true,
"username_trust": true,
"dns_valid": false,
}
}
Tổng kết
Tổng
kết
- Trên đây là hướng dẫn về API of the Funny Dev Ecosystem
- Hướng dẫn sử dụng dịch vụ IP Quality
- Instructions for using Order Simulator service
- Hướng dẫn sử dụng dịch vụ Check IBAN