https://linen.dev logo
Can we pass existing OAuth tokens at execution tim...
# 🖥│support-forum
s
Hi Composio team, We're building an integration where we already handle OAuth ourselves and store tokens in our database. We want to: 1. Pass our existing access_token/refresh_token to Composio at execution time 2. NOT go through Composio's redirect flow 3. Let Composio just execute actions using our tokens What we tried with @composio/core SDK (v0.6.5): - AuthScheme.OAuth2 with connectedAccounts.initiate() - Returns redirect URL - AuthScheme.BearerToken for Google Calendar - "Invalid auth scheme" error - REST API with auth.parameters - Requires connected account first Is there a way to achieve true BYOT where we pass tokens only at action execution time without creating a connected account through redirect? Thanks
b
Copy code
const result = await [composio.tools](http://composio.tools).execute("GOOGLECALENDAR_CREATE_EVENT", {

userId: "your_user_id",

arguments: { /* your args */ },

customConnectionData: {
authScheme: "OAUTH2", toolkitSlug: "googlecalendar", val: { access_token: "your_access_token", refresh_token: "your_refresh_token" }
Copy code
}