I'm working with my coder on a script for sending SMS. It is server-based and no user interaction. The PHP script is performing the Authorization Code Flow and getting a token for the instance each time the script is called (/restapi/oauth/token). This appears to not be the preferred method as there is a limit of "5 requests / 60 secs". So if we attempt to send more than 5 SMS requests in a 60 second period, we are getting rejected with "Request rate exceeded", I believe because the multiple token requests.
What is a better way to code this to avoid the Rate request exceeded error response? We do not have a way to multithread or internally cache the token information.
We also are not using the PHP SDK. When I looked at it, the documentation in the middle/bottom of the page is pretty sparce (https://github.com/ringcentral/ringcentral-php) on how it works and if this would resolve the issue. If calling $sdk->platform()->loggedIn(); each instance the script is called, what is returned? Does it returns that we are still logged in (authenticated) and we can continue forward with the SMS, thereby avoiding the token calls that trigger the "Request rate exceeded" error?