FreshbooksをAuth0に接続する
1
Freshbooksの設定
- Freshbooks Developerアカウントのページにアクセスし、サインアップします。
- Freshbooks Developer Centerで新しいアプリを作成します。
-
アプリの詳細を設定します。
- Application Nameを設定します。
- Redirect URIに
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.FreshBooksでは、ローカル開発の場合を除き、リダイレクトURIにHTTPSを使用する必要があります。 -
必要なスコープを選択します (例:
user:profile:read、user:clients:read、user:invoices:readなど) 。 - [Save (保存) ]を選択し、Client IDとClient Secretをコピーします。
2
Auth0の設定
このガイドでは、Auth0 で Freshbooks 接続をセットアップする手順を説明します。 このような接続を使用して、ユーザーに代わってアプリから第三者 API を呼び出す方法を一連の流れで示す例については、 ユーザーに代わって第三者 API を呼び出すクイックスタートをお読みください。
Token Vault の設定例
FreshBooks 接続で Token Vault を設定するには、アプリケーションで次のコードスニペットを使用します。- JavaScript
- Python
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.