cURL
curl --request POST \ --url https://api.tapti.ai/users/{id}/sdk-token \ --header 'Content-Type: application/json' \ --data '{ "user_platforms": [ "YOUTUBE", "TIKTOK" ], "enabled_scopes": [ "PROFILE_READ" ] }'
{ "sdk_token": "8pjBUEbqcA3bkKEBTmZ2WsduYwMH6UU23byRiU2rs........." }
// 1. Generate SDK token on your backend const sdkToken = await tapti.user().createSDKToken(userId); // 2. Redirect user to OAuth Portal const oauthUrl = `https://oauth.tapti.dev?sdk_token=${sdkToken}`; // Optional: Specify platform to skip selection screen const youtubeOauthUrl = `https://oauth.tapti.dev?sdk_token=${sdkToken}&platform=youtube`;
The ID of the user to create a SDK token for
The SDK token to create
The body is of type object.
object
SDK token created successfully
The response is of type object.