calling real time users through api

If you want to pull real time data you'll need to the Google Analytics Real Time Reporting API, the following help centre article will tell you everything you need to know, it's a more technical approach, but i'm guessing you are fine with that