FAQ: How do I fetch an access token from Pizzly and use that to authenticate an API request?

What is Pizzly?

Pizzly is “an OAuth integration proxy”. If you need to run integrations for the users of your app, and you want to run Pipedream workflows on their behalf, you can manage these apps with Pizzly. For example, if you provide an integration to your own end users and want your OAuth app to be associated with your brand, you can use Pizzly to manage the OAuth integration.

Specifically, Pizzly provides a service that:

  • Allows your end users to grant account access to your OAuth app via an OAuth popup (see their pizzly-js client)
  • Automatically refreshes users’ OAuth access tokens
  • Provides a Node.js client that allows you to fetch the most recent access token for a given user.

See their docs for more information.

How do I use Pizzly in a Pipedream workflow?

This workflow retrieves a fresh access token for a user with a specific Pizzly authId, for a specific integration. Then it uses the access token that Pizzly returns to make a request to GitHub. This allows you to run Pipedream workflows on behalf of your end users.

When you copy the workflow, you can modify it in any way, For example, you can pass an authId in the HTTP request to trigger the workflow from your application, or fetch the authId from your database.

1 Like

@dylburger this is really good as starting point! I know that the concept of multi-tenancy is something that was manifested in multiple comments (Github, the community, Hackernews), but it will be amazing to see if it’s possible to expose apps to customers in a way they can interact with their own tokens and accepting the permissions in behalf of our org instead of Pipedream for everything.

Not sure if the current workflows are compatible for that, because some of the integrations require to specify the Account you want to connect and it doesn’t seem like we can send customer accounts as a param

@francaballero I completely hear you! We’re testing a way internally to allow you to pass a custom OAuth token to any Pipedream step at runtime. We’re also planning to support fully-custom apps, where you could create your own OAuth client in Pipedream, instead of using the Pipedream-provided one. Lots more to come here!

2 Likes

Amazing! Do you know if it’s available now?

I’m building an app to help users with their Google Sheet files, so I need to use my own OAuth tokens and let users to login with their Gmail account, but atm, I can’t to it, since the OAuth screen doesn’t open up.

Any ways I can solve this?

Thank you!