Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Acts on behalf of your user in third-party OAuth 2.0 services using the assistant oauth CLI.
Use this skill ↓0% 32%+32 ptsof test cases passed
Passed 7 of 22 test cases with the skill, and 0 of 22 without it.
3 of 3 safety checks passed
Your user must connect their account for you to be able to make requests on their behalf. This typically requires that they sign in to the third-party provider using their own credentials through a typical OAuth flow.
Before the user can connect to a provider, they must have it in one of two states:
assistant oauth providers get <provider-key> --json | jq -r '.managedServiceConfigKey'
If this returns a non-null value, managed mode is supported. Unless the user has already chosen your-own mode for a deliberate reason, prefer managed mode.
assistant oauth mode <provider-key> --json | jq -r '.mode'
managed: proceed to "Initiating the Connection".your-own and managed mode IS supported: ask the user whether they'd like to switch to managed mode (it's simpler — no app to create). If yes, run assistant oauth mode <provider-key> --set managed and proceed. If no, continue to Step 3.your-own and managed mode is NOT supported: continue to Step 3.Do not perform this step if the user already has an active connection — assistant oauth status <provider-key> returning a live connection means the user has already chosen a mode; respect it.
Check whether at least one OAuth app exists:
assistant oauth apps list --provider-key <provider-key>
If there are none, see Configuring a New OAuth Application.
Next to this one in the catalogue, plus more from the same author.