운세 복호화 조회
curl --request GET \
--url https://sajuapi.dev/v1/fortunes/{id}/unmasked \
--header 'X-API-Key: <api-key>'import requests
url = "https://sajuapi.dev/v1/fortunes/{id}/unmasked"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://sajuapi.dev/v1/fortunes/{id}/unmasked', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sajuapi.dev/v1/fortunes/{id}/unmasked",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sajuapi.dev/v1/fortunes/{id}/unmasked"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sajuapi.dev/v1/fortunes/{id}/unmasked")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sajuapi.dev/v1/fortunes/{id}/unmasked")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body운세 복호화 조회
GET
/
v1
/
fortunes
/
{id}
/
unmasked
운세 복호화 조회
curl --request GET \
--url https://sajuapi.dev/v1/fortunes/{id}/unmasked \
--header 'X-API-Key: <api-key>'import requests
url = "https://sajuapi.dev/v1/fortunes/{id}/unmasked"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://sajuapi.dev/v1/fortunes/{id}/unmasked', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sajuapi.dev/v1/fortunes/{id}/unmasked",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sajuapi.dev/v1/fortunes/{id}/unmasked"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sajuapi.dev/v1/fortunes/{id}/unmasked")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sajuapi.dev/v1/fortunes/{id}/unmasked")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_bodyv1 Enterprise API (Coming Soon)이 엔드포인트는 Enterprise 버전에서 제공될 예정입니다.
현재는 v0 API를 사용하세요.
이 엔드포인트는 민감한 개인정보(프로필의 이름, 생년월일 등)를 평문으로 반환합니다. 모든 요청은 자동으로 감사 로그에 기록되며, 비정상적인 접근 패턴은 보안 검토 대상이 됩니다.
Path 파라미터
string
required
조회할 운세의 ID입니다.
ftn_ 접두사로 시작합니다.Response
성공
운세 복호화 조회에 성공하면 마스킹되지 않은 원본 데이터가 포함된 Fortune 객체가 반환됩니다.실패
| 상태 코드 | 에러 타입 | 설명 |
|---|---|---|
| 401 | authentication_error | API 키가 유효하지 않음 |
| 403 | forbidden | 복호화 권한이 없음 |
| 404 | not_found | 운세를 찾을 수 없음 |
| 429 | rate_limited | 요청 한도 초과 |
요청 예시
curl -X GET https://api.sajuapi.dev/v1/fortunes/ftn_xyz789abc123/unmasked \
-H "X-API-Key: bs_live_xxx"
const response = await fetch(
'https://api.sajuapi.dev/v1/fortunes/ftn_xyz789abc123/unmasked',
{
headers: {
'X-API-Key': 'bs_live_xxx'
}
}
);
const fortune = await response.json();
import requests
response = requests.get(
'https://api.sajuapi.dev/v1/fortunes/ftn_xyz789abc123/unmasked',
headers={'X-API-Key': 'bs_live_xxx'}
)
fortune = response.json()
응답 예시
{
"id": "ftn_xyz789abc123",
"profile_id": "prf_abc123def456",
"fortune_type": "daily",
"fortune_date": "2025-01-16",
"model": "sonnet",
"score": 85,
"summary": "오늘은 새로운 기회가 찾아오는 날입니다.",
"categories": {
"overall": {
"score": 85,
"description": "전반적으로 긍정적인 하루가 예상됩니다."
},
"wealth": {
"score": 75,
"description": "재물운이 안정적입니다."
},
"love": {
"score": 90,
"description": "인간관계가 원만합니다."
},
"health": {
"score": 80,
"description": "건강은 양호합니다."
},
"career": {
"score": 88,
"description": "업무에서 좋은 성과가 기대됩니다."
}
},
"lucky_items": {
"number": 7,
"color": "빨강",
"direction": "남쪽",
"time": "오후 2시-4시"
},
"advice": "오늘은 적극적으로 행동하되, 중요한 결정은 신중하게 내리세요.",
"profile": {
"id": "prf_abc123def456",
"name": "김철수",
"birth_year": 1990,
"birth_month": 3,
"birth_day": 15,
"birth_hour": 14,
"gender": "male",
"day_master": "병화",
"day_master_element": "fire",
"weakest_element": "water",
"saju": {
"pillars": {
"year": { "stem": "경", "branch": "오", "element": "metal" },
"month": { "stem": "기", "branch": "묘", "element": "earth" },
"day": { "stem": "병", "branch": "인", "element": "fire" },
"hour": { "stem": "을", "branch": "미", "element": "wood" }
},
"elements": {
"wood": 2,
"fire": 3,
"earth": 1,
"metal": 1,
"water": 1
}
}
},
"analysis": {
"day_energy": "오늘의 일진은 갑인(甲寅)으로 목(木) 기운이 강합니다. 병화(丙火) 일주인 당신에게 목 기운은 생기를 불어넣어 창의력과 활력이 높아집니다.",
"element_interaction": "본인의 화(火) 기운과 오늘의 목(木) 기운이 상생 관계를 이루어 긍정적인 에너지가 흐릅니다.",
"recommendations": [
"새로운 프로젝트를 시작하기 좋은 날입니다",
"창의적인 활동에 집중하세요",
"오후 시간대에 중요한 미팅을 잡으세요"
]
},
"cached": false,
"generated_at": "2025-01-16T09:00:00Z",
"latency_ms": 2340
}
마스킹 vs 비마스킹 비교
| 필드 | 마스킹 (GET /fortunes/) | 비마스킹 (GET /fortunes//unmasked) |
|---|---|---|
profile.name | 김** | 김철수 |
profile.birth_year | 19** | 1990 |
profile.birth_month | - | 3 |
profile.birth_day | - | 15 |
profile.birth_hour | - | 14 |
profile.saju | - | 완전한 사주 정보 |
analysis | - | 상세 분석 |
감사 로그
모든 복호화 요청은 자동으로 감사 로그에 기록됩니다.{
"action": "fortune.unmasked",
"resource_type": "fortune",
"resource_id": "ftn_xyz789abc123",
"actor_ip": "203.0.113.42",
"actor_api_key": "bs_live_xxx...",
"request_id": "req_xyz789",
"metadata": {
"profile_id": "prf_abc123def456"
},
"created_at": "2025-01-16T15:00:00Z"
}
복호화 요청 빈도가 비정상적으로 높은 경우 보안 알림이 발생할 수 있습니다. 필요한 경우에만 이 엔드포인트를 사용하고, 가능하면 마스킹된 데이터를 사용하세요.
⌘I