API 참조
AvatarShot은 계정 로그인 흐름, Feed 게시, Marketplace 자동화를 포함한 Second Life 연동을 위한 REST 엔드포인트를 제공합니다.
기본 URL
https://avatarshot.com/api/sl
인증
인증이 필요한 모든 요청에는 API 키 헤더가 필요합니다.
X-Api-Key: YOUR_API_KEY
계정 엔드포인트
POST /sl/login
아바타의 로그인 OTP 코드를 요청합니다.
{
"avatar_name": "Slender Huntsman",
"avatar_key": "uuid-here"
}
응답:
{
"success": true,
"code": "123456",
"message": "Use this code on avatarshot.com/verify to login",
"expires_in": 600
}
POST /sl/register
인월드에서 신규 사용자를 빠르게 등록합니다.
POST /sl/status
사용자가 등록되어 있는지와 요금제 상태를 확인합니다.
GET /sl/plans
L$ 가격이 포함된 이용 가능한 구독 요금제를 가져옵니다.
POST /sl/payment
구독 업그레이드를 위한 L$ 결제를 처리합니다.
Feed 엔드포인트
POST /sl/feed
인월드에서 Feed에 게시합니다. 이미지 URL, 텍스처 UUID, base64를 지원합니다.
{
"avatar_name": "Slender Huntsman",
"caption": "My new look!",
"image_url": "https://example.com/photo.jpg",
"tags": "fashion, secondlife",
"location": "Backdrop City"
}
POST /sl/feed/limit
사용자의 남은 일일 게시 한도를 확인합니다.
Marketplace 엔드포인트
POST /sl/marketplace/purchase
인월드 구매를 등록합니다(vendor 스크립트에서 호출).
{
"product_id": 123,
"buyer_name": "Customer Name",
"buyer_uuid": "buyer-uuid-here",
"amount": 500,
"transaction_id": "unique-id"
}
응답:
{
"success": true,
"message": "Purchase confirmed! Delivering...",
"order_number": "AS-XXXXXXXX",
"deliver_uuid": "product-inventory-uuid",
"deliver_to": "buyer-uuid"
}
POST /sl/marketplace/product-info
vendor 표시용 상품 정보를 가져옵니다.
{ "product_id": 123 }
POST /sl/marketplace/pending-deliveries
대기 중인 배송 목록을 가져옵니다(delivery bot용).
POST /sl/marketplace/confirm-delivery
배송이 전송되었는지 실패했는지 확인합니다.
{
"delivery_id": 456,
"status": "sent"
}
ANS 엔드포인트
POST /sl/ans/{store_key}
SL Marketplace 구매 알림을 수신합니다. 이 URL은 SL Marketplace 판매자 설정에서 구성합니다. ANS 통합 가이드를 참고하세요.
오류 응답
엔드포인트는 success 필드와 설명 메시지가 포함된 JSON 페이로드를 반환합니다.
{
"success": false,
"message": "Error description here"
}
속도 제한
- 로그인/등록: 분당 5회 요청
- Feed 게시: 사용자 요금제에 따라 다름(Free: 일 10회, Pro: 무제한)
- Marketplace: 분당 60회 요청
운영 환경에 연동할 때는 지수 백오프를 적용한 재시도를 구현하고, 실패한 모든 호출을 요청 식별자와 함께 로그로 남기세요.