user_profile_urlstringerforderlich
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"
}
}
]Wählen Sie ein Beispiel aus, um seine Eingaben und das Ergebnis in den Playground zu laden.
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.
Jetzt loslegen
Plattform-API-Endpunkt mit einheitlicher Authentifizierung und Nutzungsnachverfolgung.
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"
}'Legen Sie Ihren SandBase API-Schlüssel in Ihrer Serverumgebung fest. Anfragen verwenden Bearer-Authentifizierung.
export SANDBASE_API_KEY="YOUR_API_KEY"Bewahren Sie Ihren Schlüssel auf dem Server auf. Geben Sie ihn nicht in Browser-Code preis.
user_profile_urlstringerforderlichUser profile URL
Gespeicherte Beispielantwort für diese API; beim Anzeigen wird keine Live-Anfrage gesendet.
[
{
"data": {
"sec_user_id": "MS4wLjABAAAAwK6echNksY69R8l2vcZudupfhTItbGSGt-8ineO5UaB4L-djqkYDgB6TkAdMvrmW",
"user_id": "1352838578180211"
}
}
]Mehr entdecken
| API | Preis | Antwort |
|---|---|---|
Toutiao Profile User IDDiese API Toutiao | $0.001 pro Aufruf | JSON |
Toutiao | $0.001 pro Aufruf | JSON |
Toutiao | $0.001 pro Aufruf | JSON |
Toutiao | $0.001 pro Aufruf | JSON |
Toutiao | $0.001 pro Aufruf | JSON |
Toutiao | $0.071429 pro Aufruf | JSON |
Fragen
Senden Sie eine POST-Anfrage an https://api.sandbase.ai/v1/api/toutiao/app/user-id mit Ihrem SandBase API-Schlüssel im Authorization-Header (Bearer) und den Parametern als JSON-Body. Sie können das auch ohne Code direkt auf dieser Seite im Playground testen.
$0.001 pro Aufruf, abgerechnet von Ihrem SandBase-Guthaben. Es werden nur die von Ihnen getätigten Aufrufe berechnet; es gibt kein Abo.
Erforderlich: user_profile_url (string). Die Parametertabelle und der Playground auf dieser Seite listen jedes Feld auf.
Eine JSON-Antwort, die in derselben HTTP-Anfrage zurückgegeben wird (synchron). Die README auf dieser Seite enthält eine Beispielantwort.
Nein. Toutiao Profile User ID läuft über SandBase, daher deckt ein SandBase API-Schlüssel diesen Endpunkt und jede andere API sowie jedes Modell im Katalog ab. Sie müssen keinen separaten Zugang für Toutiao API beantragen.