Recherche une chaîne Twitch par nom de connexion ou identifiant et renvoie ses champs de profil publics.
GET
/api/v1/twitch/user/infoConsommation de quota: Chaque requête réussie vers ce point de terminaison déduit 1 unités de quota de votre forfait.
Paramètres de requête
Paramètres obligatoires
Ce point de terminaison n'a aucun paramètre obligatoire.
Paramètres optionnels
| Nom | Emplacement | Type | Description |
|---|---|---|---|
user_login | query | string | user_login example: ninja |
user_id | query | string | user_id example: 35739604 |
Champs de réponse
| Nom | Type | Description |
|---|---|---|
success | boolean | Success |
code | integer | Code |
message | string | Message |
data | object | - |
data.user_id | string | user id |
data.user_login | string | Channel identifier |
data.display_name | string | Channel name |
data.profile_url | string | Channel URL |
data.description | string | Channel description |
data.avatar | string | Channel avatar |
data.follower_count | integer | Follower count |
Tester
https://openapi.scdata.cc/api/v1/twitch/user/info
Sélectionnez une clé API du tableau de bord
Ajoutez une clé API avant d'envoyer une requête.Ouvrir le tableau de bord
Paramètres de requête
user_loginuser_idExemple cURL
bash
curl -X GET "https://openapi.scdata.cc/api/v1/twitch/user/info" \-H "Authorization: YOUR_API_KEY"
Exemple de réponse (200 application/json)
json
{"success": true,"code": 200,"message": "Request successful","data": {"user_id": "string","user_login": "string","display_name": "string","profile_url": "string","description": "string","avatar": "string","follower_count": 0}}
Cas d'usage
- Présélection de streamers — Vérifiez le nombre d'abonnés et la description de la chaîne avant de présélectionner un streamer.
- Résolution d'identité — Convertissez un nom de connexion issu d'un journal de chat ou d'une URL en identifiant stable pour les appels suivants.