---
title: "Discussion on \"How to make sure your Express API doesn't get abused\" | Hashnode"
description: "Discussion on \"How to make sure your Express API doesn't get abused\". Making applications for the web is a lot of fun. Sadly, there is always a risk that bad actors will abuse them. Either using them too much or using them for nefarious means.\nFor most hobby projects that isn't too much of a problem. Once we start deal..."
url: "https://hashnode.com/posts/how-to-make-sure-your-express-api-doesnt-get-abused/5f6b631961f6923cac7c01cb"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to make sure your Express API doesn't get abused](https://h.kevincunningham.co.uk/how-to-make-sure-your-express-api-doesnt-get-abused?utm_source=hashnode&utm_medium=feed)

Making applications for the web is a lot of fun. Sadly, there is always a risk that bad actors will abuse them. Either using them too much or using them for nefarious means. For most hobby projects that isn't too much of a problem. Once we start deal...

Sep 23, 2020 · 7 min read · h.kevincunningham.co.uk  
Updated Oct 25, 2020  
Read the article

-   [#express](https://hashnode.com/tag/express)
-   [#authentication](https://hashnode.com/tag/authentication)
-   [#auth0](https://hashnode.com/tag/auth0)
-   [#nodejs](https://hashnode.com/tag/nodejs)
-   [#2articles1week](https://hashnode.com/tag/2articles1week)

## Written by

[Kevin Cunningham](https://hashnode.com/@dolearning)

@dolearning · Brighton, UK

  
[View profile](https://hashnode.com/@dolearning)

Hey 👋🏻 ! I'm Kevin, a full-stack developer running a digital prototyping company with my business partner called Spin Up . When I'm not consulting and building for clients, I'm writing content here, curating my newsletter or creating videos . Outside of work, I enjoy handing out with my wife and sons - camping, hiking and kayaking or just curling up with a good book.

## Responses 3

Markdown supported · ⌘↵ to post

[Olohundare kayode](https://hashnode.com/@naskkotech)

[Sep 24, 2020](https://hashnode.com/posts/how-to-make-sure-your-express-api-doesnt-get-abused/5f6b631961f6923cac7c01cb/comment/5f6cce84d1227c4f65a9364a)

To make sure your app doesnt get abused, You could also have a rate limiter that limit how many request a user can per hour. Here is a lib that solves that for you

[npmjs.com/package/express-redis-limit-req](https://www.npmjs.com/package/express-redis-limit-req)

[Kevin Cunningham](https://hashnode.com/@dolearning)

[Sep 24, 2020](https://hashnode.com/posts/how-to-make-sure-your-express-api-doesnt-get-abused/5f6b631961f6923cac7c01cb/comment/5f6cce84d1227c4f65a9364a#reply-5f6cdff6c13a294f44d78c87)

Thanks for the work you're doing on this library!

[Maximilian Berkmann](https://hashnode.com/@berkmann18)

[Oct 1, 2020](https://hashnode.com/posts/how-to-make-sure-your-express-api-doesnt-get-abused/5f6b631961f6923cac7c01cb/comment/5f6cce84d1227c4f65a9364a#reply-5f75df37b7a1d82bf9b34b04)

Or using `express-rate-limit` or `@authentication/rate-limit`.

[Dwayne Charrington](https://hashnode.com/@DigitalSea)

[Sep 24, 2020](https://hashnode.com/posts/how-to-make-sure-your-express-api-doesnt-get-abused/5f6b631961f6923cac7c01cb/comment/5f6c68a406024b42d71ff159)

JWT's are definitely the way to go. I do recommend that developers work out how to implement them without a third-party service, though. Auth0 is great, but it's so expensive if you want to use it beyond a little hobby project. It's surprisingly easy to use the `jsonwebtokens` package to create your own implementations.

[Kevin Cunningham](https://hashnode.com/@dolearning)

[Sep 24, 2020](https://hashnode.com/posts/how-to-make-sure-your-express-api-doesnt-get-abused/5f6b631961f6923cac7c01cb/comment/5f6c68a406024b42d71ff159#reply-5f6ce012d1227c4f65a93768)

Thanks Dwayne - helpful insight :)
