<p>Not natively.  The Element API plugin provides a "read only" API to Craft's controller endpoints.  Both <code>actionUploadUserPhoto</code> and <code>actionCropUserPhoto</code> request POST/write requests.</p>

<p>You could fork it and add POST/write functionality to the plugin/API, though.</p>

CC BY-SA 3.0
2016-05-30T18:55:22.210Z
2016-05-30T18:55:22.210Z
Brad Bell
<p>Can you use the <a href="https://github.com/pixelandtonic/ElementAPI" rel="nofollow">Element API</a> plugin to utilize <a href="https://craftcms.com/classreference/controllers/UsersController" rel="nofollow">UsersController's</a> <a href="https://craftcms.com/classreference/controllers/UsersController#actionUploadUserPhoto-detail" rel="nofollow">actionUploadUserPhoto</a> and <a href="https://craftcms.com/classreference/controllers/UsersController#actionCropUserPhoto-detail" rel="nofollow">actionCropUserPhoto</a> methods?</p>

<plugin-elementapi><upload>
UsersController's actionUploadUserPhoto and actionCropUserPhoto with Element API
# UsersController's actionUploadUserPhoto and actionCropUserPhoto with Element API

(Asked by: username_0 on 2016-05-30)

Can you use the [Element API](https://github.com/pixelandtonic/ElementAPI) plugin to utilize [UsersController's](https://craftcms.com/classreference/controllers/UsersController) [actionUploadUserPhoto](https://craftcms.com/classreference/controllers/UsersController#actionUploadUserPhoto-detail) and [actionCropUserPhoto](https://craftcms.com/classreference/controllers/UsersController#actionCropUserPhoto-detail) methods?

**Tags:** plugin-elementapi, upload


---

## 1 answers

### Answer by username_1 on 2016-05-30. Score: 1

Not natively. The Element API plugin provides a "read only" API to Craft's controller endpoints. Both `actionUploadUserPhoto` and `actionCropUserPhoto` request POST/write requests.

You could fork it and add POST/write functionality to the plugin/API, though.


---

