SnapchatをAuth0に接続する
1
Snapchatの設定
- Snapchat Developerアカウントのページにアクセスしてサインアップします。
- Snap Kit Portalに移動し、Snapchat Developer Portalで新しいアプリを作成します。
- 使用するライブラリを選択します。少なくともLogin Kitは必須です。アプリでLogin Kitが有効になっていることを確認してください。
-
機密のOAuth 2.0 Client IDとclient secretを生成し、以下を控えておきます。
- Client ID (OAuth client_id)
- Client Secret (OAuth client_secret)
-
リダイレクトURIを構成します。
- リダイレクトURL:
https://YOUR_AUTH0_DOMAIN/login/callback
You can find the Auth0 domain in the Auth0 Dashboard.You can find this under Applications > [Your Application] > Settings > Basic Information > Domain.If you are using the custom domains feature, your Auth0 domain is the custom domain. You can find this under Branding > Custom Domains.Snapchatでは、リダイレクトURIにHTTPSを使用する必要があります。 - リダイレクトURL:
-
Login Kitのスコープを選択します。
https://auth.snapchat.com/oauth2/api/user.display_name- ユーザーの表示名を取得https://auth.snapchat.com/oauth2/api/user.external_id- 一意のユーザーIDを取得https://auth.snapchat.com/oauth2/api/user.bitmoji.avatar- Bitmoji用 (任意)
- 左側のパネルでVersions > [Your App Name]に移動し、Login KitセクションまでスクロールしてRedirect URIsを追加します。
2
Auth0の設定
このガイドでは、Auth0 で Snapchat 接続をセットアップする手順を説明します。 このような接続を使用して、ユーザーに代わってアプリから第三者 API を呼び出す方法を一連の流れで示す例については、 ユーザーに代わって第三者 API を呼び出すクイックスタートをお読みください。
Token Vaultの設定例
Snapchat接続にToken Vaultを設定するには、アプリケーションで次のコードスニペットを使用します。Next steps
- To learn how to configure applications to access Token Vault, read Configure Token Vault.
- If your application uses Organizations, authenticate the user with the target organization before initiating the Connected Accounts flow. Connected accounts remain linked to the individual user profile.
- To learn how to get an access token to make a tool call, complete the Call third-party APIs on user’s behalf Quickstart.