cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

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

C# to get access token

C# to get access token

navinkumar
Explorer | Level 4
Go to solution

Error  Message :Additional information: The remote server returned an error: (500) Internal Server Error.

 

i am developing  an application in Asp.net mvc to integrate drobbox .

i am creating my web service to get access token from the dropbox by this following  method 

 

public string PostRequest(string postUrl, string contentType, string parameter, string access_token)
{
using (WebClient client = new WebClient())
{
client.Headers[HttpRequestHeader.ContentType] = contentType;
if (!string.IsNullOrEmpty(access_token))
client.Headers["Authorization"] = access_token;
string result = client.UploadString(postUrl, parameter);
return result;
}
}

 

here though  i pass all the parameters i get error .

it does not throw error while checking in Insomnia  client -- getting the accesstoken perfectly .

Help me to fix the issue..

Thanks & Regards,

Naveen

 


when i run my application i get an error message Additional information: The remote server returned an error: (500) Internal Server Error.

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution
I'll be happy to help with any issues you're having with the Dropbox API, but I'll need some more information. Please reply with:

- the name and version of the platform and SDK/library you are using.
- the steps to reproduce the issue, including the rest of the relevant code snippet(s).
- the full text of the error/any output. (Feel free to include screenshots if it helps.)

View solution in original post

3 Replies 3

Greg-DB
Dropbox Staff
Go to solution
I'll be happy to help with any issues you're having with the Dropbox API, but I'll need some more information. Please reply with:

- the name and version of the platform and SDK/library you are using.
- the steps to reproduce the issue, including the rest of the relevant code snippet(s).
- the full text of the error/any output. (Feel free to include screenshots if it helps.)

navinkumar
Explorer | Level 4
Go to solution

c#code.JPGCapture.JPG

Thanks for your Reply ,

This is what my code used  to get access token .

I am using Visual Studio version 2015.

 

I get access token if  I pass same parameters in Insomnia , it throws  no issue in running Insomnia.

 

Regards and Thanks ,

Naveen 

Greg-DB
Dropbox Staff
Go to solution
Unfortunately this screenshot doesn't offer much more information, so I can't say what the issue is. For example, I don't see what the "UploadString" method is doing.

If you can share the 'X-Dropbox-Request-Id' response header value at least, I may be able to investigate based on that.
Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    navinkumar Explorer | Level 4
What do Dropbox user levels mean?