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: 

Webhook URI response in C# / .NET

Webhook URI response in C# / .NET

Malagann
Explorer | Level 3
Go to solution

Good afternoon.

I'm trying to set-up a webhooks on a C#/webform solution but every tutorial I found was either in python or .NET MVC.

Would you have a link for a relevant tutorial ? I'm stuck already on the URI enabling, I cannot seem to get a call back / echo of the "challenge" params despite returning it with the appropriate headers.

And that is without even touching the whole notification part of it. Any link, doc or tutorial that isn't in python would be more than welcome !

Thanks, Malagann

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

That error seems to indicate that Dropbox couldn't get any response from your server. Is your URL globally Internet accessible? Are you sure your handler code is set up to respond on that particular "/jaguarVoDropbox/updateJaguarMedia.aspx" route?

If that all seems to be set up right, feel free to open an API ticket with the actual URL so we can check on it for you: https://www.dropbox.com/developers/contact

View solution in original post

6 Replies 6

Greg-DB
Dropbox Staff
Go to solution

I don't believe we have a webhook sample app or tutorial in C# in particular, unfortunately. I'll send this along as a request for one, but I can't promise if/when one might be written.

I'll be happy to try and offer whatever help I can though. Can you share what you have so far, and what error you're getting?

Malagann
Explorer | Level 3
Go to solution

Hello, thanks for taking the time.

I'm simply trying to get an URI on the app/dropbox page to get started.

I've set up a URI which write a response with the specified headers of the tutorial.


Code :

Response.ContentType = "text/plain";
Response.Headers.Add("X-Content-Type-Options", "nosniff");
Response.Write(Request.Params["challenge"]);
Response.End();


Perhaps I'm just terribly wrong and have completly misunderstood the tuto' (you know what they say about the error sitting between the keyboard and the chair) and I'm doing it the wrong way on the all echo back the challenge ?

So far, that's being my issue. I have no trouble navigating, downloading files with the dropbox api but the whole webhook thing is puzzling me for now.

 

Thanks !

Greg-DB
Dropbox Staff
Go to solution

Thanks! Nothing looks obviously wrong there. What error are you getting?

E.g., if something is failing when running this code, what do you get in your log? Or, if the connection from Dropbox isn't succeeding, what do you get in webhook error output on your app's page on the App Console?

Malagann
Explorer | Level 3
Go to solution

Heyo again, the code runs without error but on the app page I'm told that :


code  a écrit :

Error: Did not receive response from server.

Request:
GET http://www.XXXX.XXXXX.com/jaguarVoDropbox/updateJaguarMedia.aspx?challenge=4XbCILXJzsFyHDD6RtHwSvKYS...

Response:
(No headers)

Response Body (First 256 bytes):
(No response body)



I hide our url but if you need it could I maybe give it to you in mp ? Or hide it behind admin tag ?

Greg-DB
Dropbox Staff
Go to solution

That error seems to indicate that Dropbox couldn't get any response from your server. Is your URL globally Internet accessible? Are you sure your handler code is set up to respond on that particular "/jaguarVoDropbox/updateJaguarMedia.aspx" route?

If that all seems to be set up right, feel free to open an API ticket with the actual URL so we can check on it for you: https://www.dropbox.com/developers/contact

Malagann
Explorer | Level 3
Go to solution

Soooo.. that problem... was of course lying between the computer and the chair. I messed up, adding www. that weren't needed. Apologies for the waste of time on that ! 

 

I'm not in the office for now but I'll work on implementing the webhook tomorrow. I'd ask for tips but I haven't really try anything and my question would be too broad. Still looking around for asp.net webform help but still no luck. 

I'll open a new thread if need be. 

Thanks & sorry again.

Need more support?
Who's talking

Top contributors to this post

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