Migrated from Redmine #1161 | Author: Jade Page
Status: New | Priority: High, I’m very impatient | Created: 2024-02-08
Hi there,
How do I increase the rate limit?
I keep reaching a rate limit and have to wait until I can try again.
Migrated from Redmine #1161 | Author: Jade Page
Status: New | Priority: High, I’m very impatient | Created: 2024-02-08
Hi there,
How do I increase the rate limit?
I keep reaching a rate limit and have to wait until I can try again.
Redmine Admin wrote:
Hi, are you on common or enterprise server?
Did you reach daily limit or minute/second limit?
Jade Page wrote:
Hi Redmine,
I think common but client has signed up for the standard package, would be possible to please hop on a call with someone from support?
we are getting rate limited but even when we don’t make many requests.
Redmine Admin wrote:
please make sure you are reusing access token and not generating a new one before each request - in most cases it is the reason of rate limiting.
Jade Page wrote:
Redmine Admin wrote:
please make sure you are reusing access token and not generating a new one before each request - in most cases it is the reason of rate limiting.
Ah yes, now we are caching the token and only refreshing when expired, it seems to work as expected.
I am having one more issue, when creating a booking, I am passing the following fetch request in, and then with the returned invoice ID using the Get Payment Link endpoint to redirect the user to pay. However, the invoices are being marked as paid already? Perhaps I am missing something?
const response = await fetch(
"https://user-api-v2.simplybook.me/admin/bookings",
{
method: "POST",
headers: {
"Content-Type": "application/json",
"X-Company-Login": process.env.SIMPLYBOOK_COMPANY,
"X-Token": token.token,
} as HeadersInit,
body: JSON.stringify({
...body,
end_datetime: new Date(
new Date(body.start_datetime).getTime() + 30 * 60000
).toISOString(),
client_id: body.client_id,
accept_payment: true,
payment_processor: "Stripe",
}),
}
);
Dmytro Bondarev wrote:
Hi, please do not pass payment_processor or pass it as delay and then call
to receive payment link.