If an API is frequently hitting rate limits, causing errors for users, what long-term solution would you consider?

  • Implement caching to reduce the number of API requests
  • Increase the rate limits for the affected endpoints
  • Optimize the client-side code to make fewer requests
  • Use a load balancer to distribute traffic evenly
Implementing caching is a long-term solution to reduce the frequency of API requests, thereby mitigating the impact of hitting rate limits and improving overall performance.

Negative testing often involves sending ________ types of data to check for API robustness.

  • Invalid
  • Null
  • Random
  • Valid
Negative testing involves sending invalid types of data to check how well the API handles unexpected inputs. Valid data is used in positive testing, not negative testing.

In API security, what is the purpose of an access token in OAuth?

  • Authenticate the Client
  • Authorize the Client
  • Identify the Resource Server
  • Identify the User
The access token in OAuth is primarily meant to identify the user who authorized the application, allowing the application to access resources on behalf of that user. It does not necessarily identify the client or resource server.