How do I authenticate users before the LLM calls? #444
-
But question, I'm confused on how to create integrations so that users can just tick them off and authenticate them for later. Any pointers to any docs on it? I saw the OpenAI integration mentions how to make it so when it's needed, it prompts the user but we wanna have this setup before hand |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You can authorize a tool (or toolkit) directly (https://docs.arcade.dev/home/auth/auth-tool-calling#authorize-a-tool-directly) at the beginning of your script/session, and then carry on using the tool. You can then keep executing the tool without worries until the token expires, and calling the auth again should refresh the token automatically (no new user auth flow needed) Note that you have to authorize one provider at a time. So instead of making one auth call per tool, you can collect all the required scopes, and then do a single call to client.auth.start (here's the relevant part of the docs: https://docs.arcade.dev/home/auth/call-third-party-apis-directly#initiate-an-authorization-request) |
Beta Was this translation helpful? Give feedback.
You can authorize a tool (or toolkit) directly (https://docs.arcade.dev/home/auth/auth-tool-calling#authorize-a-tool-directly) at the beginning of your script/session, and then carry on using the tool. You can then keep executing the tool without worries until the token expires, and calling the auth again should refresh the token automatically (no new user auth flow needed)
Note that you have to authorize one provider at a time. So instead of making one auth call per tool, you can collect all the required scopes, and then do a single call to client.auth.start (here's the relevant part of the docs: https://docs.arcade.dev/home/auth/call-third-party-apis-directly#initiate-an-authorization-r…