Personal access webhooks - what are they?


#1

I’ve been seeing a few things lately about personal access webhooks on twitter lately and just wondered if someone could explain what they are in simple terms?

I’ve noticed that some people have already created a roundup using them, are these developments that people create also accessible to the starling device team? Could that speed up the integration of roundup by using public projects?

Apologies, I know it’s probably quite technical but I’ve got no idea what they are and just wondered if there would be any benefit for current account users?


#2

Hey @Cragmireuk

Generally speaking, a webhook is a script notification that something happened, used between different applications to trigger different actions. For example, if A happens, then do B. PayPal uses them for example to relay back to the original website that a user has paid (and therefore the order can be completed).

I actually found this Starling video which may be of interest:

I don’t have any experience with the Starling webhook and API (yet!), but I would imagine other users have created scripts to move money to a goal when a transaction takes place (if a transaction takes place, then move funds)


#3

You mean you don’t know what they are, @Cragmireuk??

Nor me…:flushed:


#4

Thanks for explaining @Parker, that makes a bit more sense, so is a bit like IFTTT then. Can this code be used by starling to faster implement new things? They’re clearly mostly focused on business accounts at the moment and roundup a low priority, if someone has already cracked it, could they just use that?

If people just like to tinker, could they create custom start dates etc and some of the other very popular feature requests?

And @Graham not a clue before this


#5

Yep, just like IFTTT, except webhook are just the notification of something happening - the other side of the code would need to do the resulting action.

I’ve had a quick look at the API documentation (which is what would be used for the action side of it), and there are quite a few possibilities with it.

Tools like Zapier (which is like IFTTT) can accept a variety of webhook to trigger something else in another app (an email, notification, there’s quite a list). Someone with a bit of patience and coding knowledge could certainly put something together to perform various tasks.

I’m sure I saw elsewhere on the forum that someone released an example - will do some digging :wink:

Edit
Ok, slightly wrong - they didn’t release it. But they did write one, so moving money to a goal is certainly a possibility. Here’s the post:
A Coin Jar


#6

I’ve not had a chance to update my script since personal webhooks were released.

Currently my script runs once a day (at midnight) and does the round ups for the day and moves them to a goal. Now that webhooks are available, whenever I make a payment, the webhook will notify my script automatically, and the round up will happen in real time.

I don’t really have much experience of coding, so my code is messy and probably really bad. If I get a chance to tidy it up I’ll share it on github.

As well as roundups I’m hoping to write a few extra things into my script, such as, whenever a direct debit goes out of my account it will automatically move a corresponding amount from my Bills pot into the main account.


#7

What language have you written the script with?


#8

@Parker is indeed right!
Webhooks are basically big if statements for the internet, or in other words, a statement that says if X happens, do Y. For example, if I make a Starling payment, play some music!

Although you may not be familiar with the term ‘webhooks’, IFTTT and Zapier are both examples of webhook services, both of which you can use with the Starling API via the ‘Webhook’ options in both services.

We really pride ourselves on our open API here at Starling, which really empowers developers to link directly into Starling accounts and start building! Our developer documentation is quite detailed, providing live code examples and more - have a little look around on our developer portal if you’re interested. As well as being great for developers, our API is also the driving force behind all of our marketplace integrations, payment services engine and more!

For a bit of context, it’s worth mentioning that webhooks have actually been available for quite some time for Developers, but only for Registered Applications, and not for Developers on their own account (hence these are called ‘personal access webhooks’). They’ve been our most heavily requested developer feature for quite some time now!

I wrote the code behind these webhooks, so if you have any other questions, feel free to let me know :slight_smile:


#9

Would you host your script etc on one of these services also?


#10

It’s also worth mentioning that a developer in the community, Bill Glover, has built an open source Starling Roundup script in Golang using an AWS Lamda and Personal Webhooks, which he’s open sourced on GitHub: https://github.com/billglover/starling-roundup/


#11

Is it useable by starling? :wink:


#12

@Brian - if you were looking to perform an action that’s more generic (send an email, send a text message, etc.) then you could probably use something like IFTTT or Zapier to do the work for you with little effort.

Something more custom (like on your own Starling account) would require your own little setup, which may depend on your coding language of choice.

@SwiftPint - I’d also be interested to know what language you used (more out of curiosity than anything)


#13

Setup on AWS, azure, google etc?


#14

I’ve got a Synology NAS. Could setup a docker container …


#15

That would probably do it (AWS, Azure or Google). @lucas included a link above to be used with Amazon Lambda.

I haven’t played around with this as of yet, but it’s certainly on my (very long) to-do list.


#16

@Parker I’ve written my code in python.

@lucas Looks interesting, i’ll check that out.

I’m going to look into AWS Lamda. I’m currently running my code on an AWS EC2 instance as I am taking advantage of the free tier.


#17

This is so interesting, I need to start learning about this kind of thing, curious now!


#18

How the devil do we use this ourselves?


#19

We’re looking at potentially writing on a blog post to explain how to use Webhooks if you don’t have any development experience - watch this space! :eyes:


#20

I looked at IFTTT but looks like you can’t parse custom json there or does anyone know if I’m missing something?