I found the answer to my own question.
Using OneDrive & Sharepoint for business for this case:
Here's the guide I'm following:
with this tool: https://spmtreleasescus.blob.core.windows.net/install/default.htm
I managed to find the solution after just randomly trying everything. What you can do is as follows:
First, create the sharing link in the way I was previously:
SharingResult result = context.Web.ShareDocument(site,