In the appmanifest of my app for SharePoint I request permissions on a document library in the host web:
<AppPermissionRequest Scope="http://sharepoint/content/sitecollection/web/list" Right="Write"><Property Name="BaseTemplateId" Value="101"/></AppPermissionRequest>
What would be the way in CSOM and/or REST to discover later on in your app which document library the user has selected during installation? So the app knows in which library he is allowed to create the documents.