Hello! I wanted to ask for guidance on implementin...
# help-connector-development
k
Hello! I wanted to ask for guidance on implementing a connector using the CDK. I want to create a TikTok connector that pulls organic user (followers) and video data (likes, shares, views) using TikTok API v2. I can't use the TikTok Marketing connector since it provides different data (Ads, Adgroups, etc.), not the organic data we need. I started making the connector, but ran into issues on authentication: TikTok currently only supports OAuth2 for authentication. But I think the CDK only supports OAuth2 when you already have a refresh token, right, and not the full cycle? Additionally, you have to sign up on TikTok'd developer platform and register your app and domain, and they'll only allow redirects after authorization to the domain you registered -- which I think would be hard if we're self-hosting Airbyte on our own machines. (Though the client we're developing this for is using Airbyte Cloud -- so I guess we could register the Airbyte Cloud domain? But then I don't know how connector development goes for Airbyte Cloud) I also checked out the Research API they have available, but since this is for a business, I don't qualify for access under their requirements. Would any of you have advice on how to go about this and be able to implement the OAuth2 authentication? Right now, because of the domain registration requirement AIrbyte has, the only way I can see feasibly having a connector is if Airbyte itself deployed the connector (so the Airbyte Cloud domain is registered under Tiktok), and even then it would only be usable with Airbyte Cloud. 😢 I'd really appreciate any insights on this, I'm really not sure how to approach this particular issue. Thanks!
j
Hey @Kirsten Hipolito, Haven't used the TikTok dev platform or auth before, however, for getting the auth token, i find the easiest way is to setup a connection in postman (https://www.postman.com/). Once you have authenticated you can grab the refresh token and use that in the Connector Builder (or on the actual source connections once built) For the dev platform you should be able to register postman using the https://oauth.pstmn.io/v1/callback url. As its only used as the return redirect path on the initial auth to get the token, you don't really need to worry about registering the end use url, unless you are going to develop the whole auth flow for the connector. But from the sounds of it, this is likely only going to be for internal use anyway For further reading on postman if you haven't used it before, check out the auth documentation https://learning.postman.com/docs/sending-requests/authorization/
k
Hi @Josh Jeffries, thanks for the advice! I already tried to do that with Postman, and did register https://oauth.pstmn.io/v1/callback in the Tiktok platform, but they rejected my registration so I couldn't get the token 😢
j
i guess you have taken a look at https://joinr.com/how-to-get-ad-data-tiktok-api/ ? i would have thought it should be a similar signup process etc there is also https://www.postman.com/tiktok/workspace/tiktok-api-for-business/overview which could help. Apart from that, can't really suggest anything else, hopefully someone else might be able to help
k
Thanks for the resources 🙂 Yep I saw those too but unfortunately they're for the TikTok Business API (for ads and campaigns on TikTok, or when you sell stuff there), while I'm looking to get the organic/public data such as user followers, video views and likes, etc. But I did check out the TikTok marketing connector that Airbyte currently has, it seems they also took the approach of having the user create their own Business account and registering an app, so you're using your own App ID and secret. If that worked for the TikTok Business connector, I think I'll try again with registering an app on TikTok, hopefully they'll approve this time 🙂
p
Hi, @Kirsten Hipolito, how did this turn out? I'm in the same boat but unlikely to be able to build my own connector, if I am being honest 😬
k
Hi @Peter Howley, I ended up building a custom connector in the end 😅 The custom connector works, but we found that TikTok is a bit fiddly with granting apps access, so the easiest solution was to registe the app under the account where the data should be pulled
p
Thanks for letting me know, Kirsten (and congrats! And sorry I didn't see the notification). My non-profit is considering hiring an offshore data engineering firm to attempt the same. Is yours a "Community Connector" that we can instead just leverage? I'll understand if it is instead proprietary...
o
Hey @Peter Howley, Any chance you would be willing to share the connector code for this specific connection? I am trying to do this for my company but its a bit of a headache and would love to seer how you tackled it.
p
Sorry I missed this, @Oisin McKnight. Let me check with the vendor and my boss, should be do-able. We discussed at start making it a Community Connector...