Check for logged in user with the Element API plugin Working on a SPA with Vue and Craft and looking to check if a user is logged in to run some Vue conditional logic.

I imagine that will then enable me to check if the logged in user owns content to return as well?
Assuming you want to do this from your transformer, then something like this should work:

'transformer' =&gt; function($entry) {

    $isLoggedIn = craft()-&gt;userSession-&gt;isLoggedIn(); 

    if ($isLoggedIn) {
        // Do your custom logic.
    }

    return array(
        'title' =&gt; $entry-&gt;title,
        'url' =&gt; $entry-&gt;url,
        'description' =&gt; (string) $entry-&gt;description,
        'photos' =&gt; $photos
    );
},