user_profile_urlstringrequerido
User profile URL
https://api.sandbase.ai/v1/api/toutiao/app/user-idResolves a Toutiao user profile URL into numeric and secure user identifiers. Returns the user ID and sec_user_id associated with the provided profile link.
[
{
"data": {
"sec_user_id": "MS4wLjABAAAAwK6echNksY69R8l2vcZudupfhTItbGSGt-8ineO5UaB4L-djqkYDgB6TkAdMvrmW",
"user_id": "1352838578180211"
}
}
]Seleccione un ejemplo para cargar sus entradas y el resultado en el playground.
This API takes a Toutiao user profile URL and returns the numeric user_id and the sec_user_id for that account. It needs one input, user_profile_url.
user_id before you look up the account.sec_user_id from a profile link to use in other Toutiao requests.user_id values.curl -X POST "https://api.sandbase.ai/v1/api/toutiao/app/user-id" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"user_profile_url": "https://www.toutiao.com/c/user/token/MS4wLjABAAAAwK6echNksY69R8l2vcZudupfhTItbGSGt-8ineO5UaB4L-djqkYDgB6TkAdMvrmW/"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
user_profile_url | string | Yes | User profile URL |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"sec_user_id": "MS4wLjABAAAAwK6echNksY69R8l2vcZudupfhTItbGSGt-8ineO5UaB4L-djqkYDgB6TkAdMvrmW",
"user_id": "1352838578180211"
}
| Field | Meaning |
|---|---|
user_id | Numeric ID of the Toutiao account. It is returned as a string. |
sec_user_id | Secure user ID for the same account. In the example, it matches the token segment at the end of the profile URL. |
user_profile_url. The example uses the form https://www.toutiao.com/c/user/token/<token>/.user_id to Toutiao User Profile.$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
Empiece a construir
Endpoint de la API de la plataforma con autenticación unificada y seguimiento de uso.
curl -X POST "https://api.sandbase.ai/v1/api/toutiao/app/user-id" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"user_profile_url": "https://static.sandbase.ai/examples/4494279d-e579-4329-bbf7-b759ee763f46/input/9295e84f-2dcb-46b2-9db8-9e97dabb7c99.bin"
}'Configure su clave de API de SandBase en el entorno de su servidor. Las solicitudes usan autenticación Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Conserve su clave en el servidor. No la exponga en código del navegador.
user_profile_urlstringrequeridoUser profile URL
Respuesta de ejemplo guardada para esta API; no se realiza ninguna solicitud en vivo al verla.
[
{
"data": {
"sec_user_id": "MS4wLjABAAAAwK6echNksY69R8l2vcZudupfhTItbGSGt-8ineO5UaB4L-djqkYDgB6TkAdMvrmW",
"user_id": "1352838578180211"
}
}
]Explorar más
| API | Precio | Respuesta |
|---|---|---|
Toutiao Profile User IDEsta API Toutiao | $0.001 por llamada | JSON |
Toutiao | $0.001 por llamada | JSON |
Toutiao | $0.001 por llamada | JSON |
Toutiao | $0.001 por llamada | JSON |
Toutiao | $0.001 por llamada | JSON |
Toutiao | $0.071429 por llamada | JSON |
Preguntas
Envía una solicitud POST a https://api.sandbase.ai/v1/api/toutiao/app/user-id con tu clave API de SandBase en el encabezado Authorization (Bearer) y los parámetros como un cuerpo JSON. También puedes probarlo en el Playground de esta página sin escribir código.
$0.001 por llamada, facturado desde tu saldo de SandBase. Solo se te cobra por las llamadas que haces; no hay suscripción.
Requeridos: user_profile_url (string). La tabla de Parámetros y el Playground de esta página enumeran todos los campos.
Una respuesta JSON devuelta en la misma solicitud HTTP (sincrónica). El README de esta página incluye una respuesta de ejemplo.
No. Toutiao Profile User ID funciona a través de SandBase, así que una sola clave API de SandBase cubre este endpoint y todas las demás APIs y modelos del catálogo. No necesitas solicitar acceso a la API de Toutiao por separado.