Get Rate Limit Information from node-auth0

Overview

This article explains how to get rate limit information in the response when using node-auth0 to make requests against the Management API.

Applies To

  • node-auth0

Solution

The following javascript should provide the requested information:

const {data, headers} = await managementClient.usersByEmail.getByEmail({ email: event.user.email })

console.log(Object.fromEntries(headers))

Get individual values with:

headers.get('x-ratelimit-limit')