cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Share your feedback on the Document Scanning Experience in the Dropbox App right here.

Discuss Dropbox Developer & API

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Api error access denied

Api error access denied

admsho
Explorer | Level 3

hi everyone, am trying to use the new API of Dropbox, but I am having some difficulties. I did however create an app console on personal free dropbox ACC, and I got the needed information (Appkey, App Secret,...) in order to generate auth2, and I downloaded the example located in (dropbox-sdk-dotnet\examples\simpleTest\) on GitHub.

I only change the following but it keeps giving error "Acees denied":

private const string ApiKey = @"xxxxxxxx";

private const string LoopbackHost = "https://www.dropbox.com/oauth2/";

please explain to me if the link I have used is correct, and is there any other info that I need to provide??

thank you in advance

15 Replies 15

admsho
Explorer | Level 3

this code :

 

admsho_2-1675703697577.png

shows this , after I add the link at app console as shown at the post previously:

admsho_0-1675703634622.png

then when I continue and allow it, it shows :

admsho_4-1675703929454.png

 

 

 

Здравко
Legendary | Level 20

Ok, the above shows that your localhost is working. So, again, do you get proper result from the mentioned function? :thinking_face: Take in mind that the example code (part that you haven't shown) doesn't return back to the browser anything if you haven't changed it somehow! :slightly_smiling_face:

admsho
Explorer | Level 3

I have used the same code in github:

dropbox-sdk-dotnet/Program.cs at master · dropbox/dropbox-sdk-dotnet (github.com)

I only changed my Appkey.

and I add the (LoopbackHost="http://127.0.0.1:52475/") URI in the app console to correspond with the one at the code.

I want to be able to use API in a windows application in the future for multiple users (am using a Business License)

I believe the code must stay as is with the localhost URL, but what all other configurations I need to do in the console:

(* will localhost will be used at the final stage when it is ready for publishing or will I need to change it?

and the app console:

 

my concern what the following fields should be on the final shape:

  1. Redirect URIs
  2. Chooser / Saver / Embedder domains
  3. Webhooks
  4. Extension
 

 

 
 
 
 

but I keep getting the following exceptional error:

System.AggregateException
HResult=0x80131500
Message=One or more errors occurred.
Source=SimpleTest
StackTrace:
at SimpleTest.Program.Main(String[] args) in C:\Users\admsh\OneDrive\Desktop\dropbox-sdk-dotnet-master\dropbox-sdk-dotnet-master\dropbox-sdk-dotnet\Examples\SimpleTest\Program.cs:line 56

This exception was originally thrown at this call stack:
[External Code]

Inner Exception 1:
HttpRequestException: An error occurred while sending the request.

Inner Exception 2:
WebException: The request was aborted: Could not create SSL/TLS secure channel.

 

 

Здравко
Legendary | Level 20

@admsho wrote:

...

(* will localhost will be used at the final stage when it is ready for publishing or will I need to change it?

...

Whatever is the public domain name of particular machine (if any), localhost domain (and the corresponding IP) is always available and the same. That's why it's convenient is such cases and you wouldn't need to change anything.

 


@admsho wrote:
...

my concern what the following fields should be on the final shape:

  1. Redirect URIs
  2. Chooser / Saver / Embedder domains
  3. Webhooks
  4. Extension

...


For local applications only 1) matters; all others are ignored.

 


@admsho wrote:

...
WebException: The request was aborted: Could not create SSL/TLS secure channel.


Dropbox servers related to API interfaces support TLSv1.2 only! Check in your environment is the same connection encryption enabled or not. Make sure it is!

admsho
Explorer | Level 3

where should I check the TSL and fix it ?

Здравко
Legendary | Level 20

For Windows you can start here: https://learn.microsoft.com/en-us/mem/configmgr/core/plan-design/security/enable-tls-1-2

Take in mind that your build environment may need additional "tuning"; read the related documentation.

Good luck.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Здравко Legendary | Level 20
  • User avatar
    admsho Explorer | Level 3
What do Dropbox user levels mean?