Building a Simple REST API for Mobile Applications

How you can differentiate which client makes the request? I.e. for js, you’ll have to validate captcha or for mobile you’ll have to send some push notifications and so on. Do you think http headers are a good approach?