Rate_limit with /userinfo

How can use X-RateLimit-Limit: 20 in CURL call to avoid the error of to many requests.

Hey @haroon.momin,

x-ratelimit-limit shows the maximum number of requests available in the current time frame. The time frame is variable. For the /userinfo endpoint, the time frame should be 1 minute, so as far as I know, x-ratelimit-limit is telling you that you could make 20 or fewer cURL calls every minute to the /userinfo endpoint.

You could also use x-ratelimit-remaining or x-ratelimit-reset to control the usage too.

I wanted to add something else: Consider requesting an id_token instead of calling /userinfo to get information about the user.

You might find useful our Authentication API Endpoint Rate Limits documentation and also our Rate Limit Policy for details on how to handle rate limits.