I used Dropbox api and successfulley got the token and and uploaded and download to and from Dropbox from both iOS and Android. Where my problem arise when the user gives app permission to dropbox there appears a code that has to be copy pasted by the user which is then used to get the access token. Recently I found some apps fetching that code automatically to app .Help me doing it and I have no idea about the redirect Uri
It sounds like you're currently using the OAuth 2 "code" flow without a redirect URI, so that the user needs to copy and paste the authorization code into your app to complete the app authorization flow.
It is possible to streamline this by using a "redirect URI", so that the authorization code (or access token, for the "token" flow) is automatically passed to your app. To do this, you should specify the 'redirect_uri' in the /oauth2/authorize URL. You can find more information on using this in the documentation for /oauth2/authorize. I also recommend reading the OAuth Guide, if you haven't already.
We don't have an official SDK for Xamarin though, so this may require some more work to do this in Xamarin on iOS/Android. For native clients like that, you can use a custom local URL scheme for your redirect URI.