Scripting - API call to a tool that uses OAuth 2.0?

I’ve been leraning how to using scripting with API calls out to other tools. I’ve written several scripts that go out and get data from other tools and then update the data inside my Airtable bases accordingly. (I get giddy every time I hit that button and see things update… it feels like magic! :laughing:)

I’m trying to connect to a tool that has OAuth 2.0 authentication. At this point I am assuming it’s not possible to write a script that will do this?

I know how to use Make’s HTTP module to do what I need to do but I’ve really enjoyed writing these scripts and would love to expand my knowledge if there is a way to do it with scripting.

The tool I’m trying to connect to is Pike13. Authentication

I’ve never connected to Pike 13 (never heard of it either). :wink: When faced with unknowns like this, I turn to Bard and ask it to:

Generate a Javascript integration to get data from Pike13 using oAuth.

It says:

This code is not necessarily Airtable’s flavor of javascript, nor is it likely to represent working code. But when faced with this in a learning mode, I tend to lean on Replit first to ensure I understand the mechanics of working with oAuth and Pike in a pure NodeJS environment. I also like Replit because I don’t need to set anything up - it’s a node server in the sky and makes it easy for low-code learners to understand stuff faster.

The code appears to be pretty good. Maybe it will help.

Bard also includes this explanation -

This code first creates an OAuth object with your client ID, client secret, and redirect URI. Then, it uses the getAccessToken() method to get an access token from Pike13. Once the access token is obtained, it makes a request to the Pike13 API to get the data. The response is then parsed into JSON and returned.

You can replace the your_client_id, your_client_secret, and your_redirect_uri values with your own values from Pike13. You can also use this code as a starting point to create your own integration with Pike13.


Thank you @bfrench. I appreciate those tips and walking me through that thought process of what you would do.

I had never heard of Replit. It looks like it could be a great resource as I play around and try to learn.

1 Like

The term “learn” is so significant.

Not many low-coders know about Replit and its mission to create a billion developers by 2030. Today, it is mostly a platform for writing, testing, and deploying code. But this is changing, and AI is making it possible for domain experts (like you and me) to create and deploy “machines” that do important tasks for us. @Kuovonne is not so sure. :wink: I definitely baited her to comment on the next few observations because she is also into learning systems in a big way.

One of the things most newcomers to Replit will not fully grasp is that it is an emerging low-code marketplace where others can use your Repls. Compensation is also possible when someone uses something you created.

The architecture to do this is already built into Replit, which makes it possible to instantly pick a solution (a Repl), and deploy it as a new instance, possibly customized as well.

Perhaps you know that webhooks can serve data. @ScottWorld has helped us understand that Make is far more than Zapier in many ways. Under the covers, it has the ability to do many of the things Replit can do, and this is why I believe there will soon be a merger (or big battle) for the minds of low-coders based on these concepts - one very visual (Make), and the other very code-capable (Replit).

We have come to understand that no-code is the big driving force. It was. Low-code will be massively larger than the no-code movement. Pure no-code platforms will soon be left behind because AI will transform the low-code movement into a market of a billion developers. Replit and make are right at the leading edge of that movement, however sublime it may seem.

1 Like

While I think it is technically possible, after a little bit of poking around, I decided that I didn’t want to bother trying. When I need an Airtable script that needs an OAuth connection, I have my script call a webhook and let Make handle the authentication.

How do you plan to create a new OAuth object when Airtable scripting doesn’t allow libraries?

Really? You know I really have other things to do that are way less fun than replying to you.

I’m not familiar with Replit. And it looks like I need an account to try it out. And that is just too much friction for me right now. The idea looks nifty. I’m also curious about trying out a coding co-pilot but not curious enough to shell out any money or sign-up for a limited time trial.

I agree with this. I think that low-code has amazing potential. It is also where I feel I belong. There also isn’t just one way of doing low-code. There are lots of ways to do low-code, just as there are lots of ways to do no-code or code.

I also think that there are lots of aspects of both writing low-code and learning to write code that I feel could use improvement. As surprising as it might sound, I miss some features of VBA. Using a coding co-pilot can help with learning to code and with writing code, but I haven’t used a coding co-pilot enough to give real feedback. Here’s my vague ideas based on my very limited perusal of coding co-pilot ads.

  • I think that using a coding co-pilot could be very useful for identifying vocabulary issues. Don’t know what library to use or if one exists? Ask the co-pilot. Did you use for ... in when you probably should have used for ... of. The co-pilot can flag that for review.
  • Just as grammar and spell check are useful for typing English, grammar and spell check are super useful for writing code. (Bill, I started using Grammerly on your recommendation, and I don’t hate it.) But I also think that memorizing spelling and grammar so that they become second-nature is important. Even if the co–pilot can fix spelling and grammar issues, writing code with fewer spelling and grammar issues in the first place will make for better/faster development.
  • The co-pilot could also be useful for working with common patterns. I think this is most useful for experienced programmers who know how to quickly prompt the co-pilot to create code that fits a pattern.
  • I suspect that a coding co-pilot could generate tests.

But my main issue is that I don’t think AI is ready to create complex logic for people who struggle to clearly articulate their needs. I think that novice coders really want this use case to work, and it just isn’t there yet. Maybe it will get there sooner than I expect.

What I really want is AI that can translate complex logic that I write in English into computer code. But I haven’t figured out how to do that yet. Maybe it is because I haven’t figured out how to write the correct prompts. Or maybe it is because the AI tools I’ve tried aren’t capable of doing it.

I also have vague ideas about using AI to generate a variety of training material, but I don’t have the bandwidth for experimenting with this anymore. I’m sure other people are working on this anyway. I think this has the potential to transform education.

Well, that’s a ramble.

1 Like

This is why I said, it’s not Airtable scripting compliant. If she is able to make this work, it might be an approach that could push data into Airtable via a simple webhook. But I like the Make approach too.

Another really good learning site for low-code is Val Town.

love this.


1 Like