오늘 이 문제를 발견했습니다.
모든 사용자에 대해 글로벌 스코프를 가진 API 키를 생성한 후, 주제를 업데이트하면 invalid_access 오류가 발생합니다.
curl --location --request PUT 'https://example.com/t/-/365.json' \
--header 'Api-User: system' \
--header 'Api-Key: ***' \
--header 'Content-Type: application/json' \
--data-raw '{
"tags": ["awesome-tag"]
}'
{
"errors": [
"You are not permitted to view the requested resource. The API username or key is invalid."
],
"error_type": "invalid_access"
}
그러나 system 사용자에게 글로벌 API 키를 생성하면 정상적으로 작동합니다: 동일한 요청, 다른 키.
curl --location --request PUT 'https://example.com/t/-/365.json' \
--header 'Api-User: system' \
--header 'Api-Key: DIFFERENT_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"tags": ["awesome-tag"]
}'
{
"basic_topic": {
"id": 365,
"title": "Test topic",
"fancy_title": "Test topic",
"slug": "test-topic",
"posts_count": 6
}
}