Ho notato questo problema oggi.
Generare una chiave API per tutti gli utenti con ambiti globali e poi aggiornare un argomento comporterà un errore 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": [
"Non sei autorizzato a visualizzare la risorsa richiesta. Il nome utente o la chiave API non sono validi."
],
"error_type": "invalid_access"
}
Tuttavia, se generi una chiave API globale per l’utente system, funziona: stessa richiesta, chiave diversa.
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
}
}