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 notification with wrong header

Webhook notification with wrong header

luigiafassina
Explorer | Level 4
Go to solution

I'm using dropbox sdk java 4.0.1. I've configured my webhook url (in the app console) for receiving notification on my server. It works but I receive these headers in the notification:

 

host my.machine
user-agent DropboxWebhooks/1.0
accept */*
accept-encoding gzip,deflate
X- ropbox-Signature d4exxx65
content-type application/json
content-length 108

(I replaced sensitive data)

 

As you can see, the header name is wrong. Is it expected? Am I doing something wrong? 

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

There doesn't appear to be anything wrong in these lines, but it's possible the header name is getting corrupted elsewhere in the stack, before the value gets to your code.

View solution in original post

3 Replies 3

Greg-DB
Dropbox Staff
Go to solution

That header name "X- ropbox-Signature" does look incorrect; it should be "X-Dropbox-Signature". I just tried this myself though, setting up a server to receive Dropbox webhook notifications, and I am receiving the correct "X-Dropbox-Signature" header name, not "X- ropbox-Signature", so there may be something on your webhook URI server corrupting that on the receiving side.

 

How are you receiving these webhook notifications, and how are you printing out the headers? (The version of the Dropbox Java SDK you're using wouldn't be relevant as that SDK doesn't handle the receipt of webhook notifications; that would be done by your web framework.)

luigiafassina
Explorer | Level 4
Go to solution

I set the Webhook URI in the App Console. Then my server receives the request and I print it as

Collections.list(request.getHeaderNames()).stream().forEach(h -> log.info(h + " (" + request.getHeader(h) + ")"));

 but also reading as

String signature = request.getHeader("X-Dropbox-Signature");

is empty.

I'm going to check my code but a part this I should do nothing before...

Greg-DB
Dropbox Staff
Go to solution

There doesn't appear to be anything wrong in these lines, but it's possible the header name is getting corrupted elsewhere in the stack, before the value gets to your code.

Need more support?
Who's talking

Top contributors to this post

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