Pushing Podio
Search
šŸ‘„

API Integration Part 2: User Management

šŸ“–
Contributed by Andrew Cranston, CTO of We Are Gamechangers.
UPDATE (11/16/18): I have released a second version of the Podio API User Manager. I have removed the App Pack from the Podio App Market, it is now available as a public repo using ProcFu's new Deployment Manager tool.

If you've made it through theĀ first partĀ of this tutorial, you should know how to connect an API to ProcFu and the general method by which we call the API based on a user ID.

If you're the only user in your Podio system, or if you intend to make API calls on behalf of only one user, then you can use the same user ID in all your flows. However, if you're planning on making calls on behalf of multiple users, it would make the process easier by having a system that handles the authorization process and then gives you a database of IDs to search.

To perform this process, I have created an App Pack, the ProcFu API User Manager. All you need to do is install this pack into the workspace of your choice and then perform a couple of quick extra installation steps.

  1. After you have refreshed GlobiFlow and the flows have installed, there are two flows (the one in APIs and the one in Users) that involve ProcFu calls, but the headers are without auth info. If you haven't already done so, sign up for a Procfu account, get your API key and placeĀ Authorization: Basic {API_KEY}Ā in the header of every GlobiFlow POST action in both flows. This is actually madeĀ muchĀ easier if you install and setup the ProcFu Chrome Extension first. Then, all you have to do is open the flow and save it again.
  1. Open up the "01" flow in both Approvals and Denials and fix the broken tokens for the External URLs.

The first step after install is to set up an API in both Podio and ProcFu. I've attempted to make this easier as well by starting a repository in theĀ ProcFu Users workspace. This repository will be expanded over time and will contain all the info you need to add to ProcFu to start using the API. By including the corresponding slug when adding a new item in your APIs App, it will automatically populate the item with all the URLs you need. After this, it's a simple matter of copying and pasting them into ProcFu.

Now that you have an API ready to go, you can add your first user. All of the fields in the Users app are required. I would suggest the following format for best results:

Once you have created a new user item, a login link will be generated and added as a comment, after which the item will be shared with the email used as the user ID. After clicking the link, the user will be directed to the service to approve or deny, then redirected to a GlobiFlow external URL which will update Podio with the result.

Once the user is authorized, you simply need to write a flow that uses ProcFu to make anĀ API RequestĀ and use the correct user ID.

That's it! There are a few APIs in the repository already, but if you find one that we should add, drop me a line in the workspace.

(c) 2024 Globi Web Solutions | Join the Discussion in our Podio Workspace.

x