On my website i would like the user to be able to upload a file they have created to google drive. The file is located on the server.
Currently i am using javascript to authenticate the user and receive an access token. I am then using ajax to post the access token to the my server.
My trouble though is using this access token with the google drive .net sdk v3.
Dim Service = New DriveService()
How do I tell the service to using the accesstoken i have acquired? It seems to require a type of Iauthenticate.
The current flow is working well for facebook and youtube.
Update:
Now getting Error occurred while sending a direct message or getting the response.
I ran fiddler and the response was "error" : "redirect_uri_mismatch" so i changed the AuthState.Callback = New Uri(NativeApplicationClient.OutOfBandCallbackUrl) to reflect my current domain but still get that error. I have made sure the app is setup correct in the app console.
I think its because the redirect uri i am sending in javascript is different to the one I am sending in .net. Javascripts callback url is "postmessage"
I have tried not sending a call back url but it complains it is missing. Have tried setting a callback url of "postmessage" but it complains that it is not a uri.
Any ideas?