You do of course need to type what you expect to get in the response and then use within your application. In my experience any unused data needn't be typed...
But this is one situation where IMO typings can give a false sense of security: API responses that are out of your control can (and often will) change unexpectedly - e.g. return null on a property where you don't expect it; so it's still important to have some guards in place to avoid responses that might crash your application.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You do of course need to type what you expect to get in the response and then use within your application. In my experience any unused data needn't be typed...
But this is one situation where IMO typings can give a false sense of security: API responses that are out of your control can (and often will) change unexpectedly - e.g. return
null
on a property where you don't expect it; so it's still important to have some guards in place to avoid responses that might crash your application.