user_profile_urlstringobbligatorio
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"
}
}
]Seleziona un esempio per caricare i suoi input e il risultato nel 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.
Inizia a costruire
Endpoint API della piattaforma con autenticazione unificata e tracciamento dell'utilizzo.
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"
}'Imposta la tua SandBase API key nell'ambiente del server. Le richieste usano l'autenticazione Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Conserva la tua key sul server. Non esporla nel codice del browser.
user_profile_urlstringobbligatorioUser profile URL
Risposta di esempio salvata per questa API; durante la visualizzazione non viene eseguita alcuna richiesta live.
[
{
"data": {
"sec_user_id": "MS4wLjABAAAAwK6echNksY69R8l2vcZudupfhTItbGSGt-8ineO5UaB4L-djqkYDgB6TkAdMvrmW",
"user_id": "1352838578180211"
}
}
]Esplora altro
| API | Prezzo | Risposta |
|---|---|---|
Toutiao Profile User IDQuesta API Toutiao | $0.001 per chiamata | JSON |
Toutiao | $0.001 per chiamata | JSON |
Toutiao | $0.001 per chiamata | JSON |
Toutiao | $0.001 per chiamata | JSON |
Toutiao | $0.001 per chiamata | JSON |
Toutiao | $0.071429 per chiamata | JSON |
Domande
Invia una richiesta POST a https://api.sandbase.ai/v1/api/toutiao/app/user-id con la tua chiave API di SandBase nell'header Authorization (Bearer) e i parametri nel body JSON. Puoi anche provarla nel Playground di questa pagina senza scrivere codice.
$0.001 per chiamata, addebitato dal tuo saldo SandBase. Paghi solo le chiamate che effettui; non c'è alcun abbonamento.
Richiesti: user_profile_url (string). La tabella dei parametri e il Playground di questa pagina elencano tutti i campi.
Una risposta JSON restituita nella stessa richiesta HTTP (sincrona). Il README di questa pagina include una risposta di esempio.
No. Toutiao Profile User ID funziona tramite SandBase, quindi una sola chiave API SandBase copre questo endpoint e tutte le altre API e modelli del catalogo. Non è necessario richiedere separatamente l'accesso alle API Toutiao.