Je viens d’essayer et cela fonctionne pour moi :
○ → curl -s -L -H 'api-key: «redacted»' -H 'api-username: doesnotexist' https://try.discourse.org/u/运思/notifications.json
{"errors":["You are not permitted to view the requested resource. The API username or key is invalid."],"error_type":"invalid_access"}
○ → curl -s -L -H 'api-key: «redacted»' -H 'api-username: 运思' https://try.discourse.org/u/运思/notifications.json | jq '.users[0]'
{
"id": 41,
"username": "运思",
"name": "Michael Brown",
"avatar_template": "/user_avatar/try.discourse.org/运思/{size}/208_2.png",
"trust_level": 1,
"assign_icon": "user-plus",
"assign_path": "/u/运思/activity/assigned"
}
Pouvez-vous démontrer comment cela échoue pour vous ?