Getting started
Bắt đầu nhanh
Join as a partner, create an API key and send your first eSIM search request.
Get an API key#
- 1Đăng nhập bằng tài khoản esimoa và đăng ký tại bảng điều khiển.
- 2Tạo khóa trong mục Khóa API. Khóa chỉ hiển thị một lần nên hãy lưu ngay.
Make your first request#
Gọi API như bên dưới để lấy eSIM Nhật Bản 7 ngày sắp xếp theo giá.
curl "https://api.esimoa.com/v1/esims?country=JP&days=7&sort=price&limit=3&lang=en" \
-H "X-API-Key: esk_live_your_key_here"const res = await fetch(
'https://api.esimoa.com/v1/esims?country=JP&days=7&sort=price&limit=3&lang=en',
{ headers: { 'X-API-Key': process.env.ESIMOA_API_KEY } },
);
if (!res.ok) throw new Error(`esimoa API ${res.status}`);
const { items, total } = await res.json();
for (const esim of items) {
console.log(esim.title, esim.priceKrw, esim.url);
}import os
import requests
res = requests.get(
"https://api.esimoa.com/v1/esims",
params={"country": "JP", "days": 7, "sort": "price", "limit": 3, "lang": "en"},
headers={"X-API-Key": os.environ["ESIMOA_API_KEY"]},
timeout=10,
)
res.raise_for_status()
for esim in res.json()["items"]:
print(esim["title"], esim["priceKrw"], esim["url"])Read the response#
URL cơ sở là https://api.esimoa.com. Mọi phản hồi đều là JSON và giá là số nguyên tính bằng KRW.
url của mỗi mục đã chứa mã đối tác của bạn. Hãy hiển thị nguyên trạng để nhận hoa hồng từ các giao dịch mua qua liên kết đó.
