Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Dropbox webhook integration using a custom module implementing controllers

By
roman onosovski
on 6/9/14, 1:48 PM 1,189 views

Hi all, I am new to OpenERP and I am working on integrating Dropbox with OpenERP.

I am having trouble with the webhook feature of Dropbox this is why:

Upon creating the webhook address in Dropbox API, initially it sends out a GET with a challange that it wants bounced back to verify that you are in fact there listening. I was able to accomplish this with a controller

@http.httprequest

index(self, req, **kw):

if 'challenge' in kwargs:
return kwargs.get('challenge')

However, after this initial verif, dropbox then sends JSON POSTS to the same address.

The @http.httpresponse seems to not respond to any JSON whatssoever and @http.jsonrequest demands that there be a JSON request and will not work otherwise.

Any ideas? Thank you in advance!

1
roman onosovski
On 6/9/14, 2:13 PM

Ill answer my own question!

Use req.httprequest.data as the JSON was in the body and not a RPC request.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 6/9/14, 1:48 PM
Seen: 1189 times
Last updated: 3/16/15, 8:10 AM