Question or Issue
I'm a little frustrated with the poor examples of dropbox... :-( I'm trying to start with Oauth, I'm trying to build a c# console app that will run for hours, since the tokens expire fast, I tried to get oauth integrated, but at step 1 it dies.. my code starts as follows:
const string AppKey = "XXXXXXX"; // Replace with your App Key
const string AppSecret = "XXXXXXX"; // Replace with your App Secret
const string RedirectUri = "http://localhost:8080/"; // Replace with your Redirect URI
// Generate a unique state for security
string oauth2State = Guid.NewGuid().ToString("N");
// Get the authorization URI
Uri authorizeUri = DropboxOAuth2Helper.GetAuthorizeUri(
OAuthResponseType.Code,
clientId: AppKey,
new Uri(RedirectUri),
state: oauth2State,
tokenAccessType: TokenAccessType.Offline
);
BUT as soon as my browser opens, I get an ugly error as follows:
I did check the url and the client_id is there... (of course is not XXXXXXX)
https://www.dropbox.com/oauth2/authorize?response_type=code&client_id=XXXXXXXXXX&redirect_uri=http://localhost:8080/&state=65b4556d0f1f4639ac42b6cdfce08fb7&token_access_type=offline
I understand my App Key is my client Id, thank you for any help you may bring.