Using groovy SmartApps, you can:
- Install apps you have published in your own account using the OAuth flow
- Install apps others have had officially published (by SmartThings) in your account using the OAuth flow
As of 2016, you can not install an app that others have published to their own accounts via OAuth.
From the Web Service SmartApp docs:
Beginning February 1, 2016, only SmartApps approved and published by SmartThings can be installed via the OAuth flow discussed below.
For testing purposes, you will be able to install into your own account only.
For more information, see this community post.