Menu
  • HOME
  • TAGS

Test Dropbox webhooks implementation with self-signed certificate?

Tag: dropbox-api,webhooks

I'm setting up use of Dropbox webhooks in a web application. I'd like to do the development on my local machine. I can access my local machine via https from the Internet, but when I try to add the URL as a webhook URI in Dropbox App Console I found that it seems to require the SSL certificate to not be self-signed. Is there a way to do testing on a local machine with a self-signed certificate? The error message is below. After complaining about the cert it also says there is no response body, but I'm guessing this is because it didn't even get as far as checking the body (I've tested my URL by loading it directly in a browser and via wget from a remote server and the response contains the desired content).

Error: SSL certificate problem: self signed certificate

Request: GET https://my.domain.com/dropbox-webhook?challenge=urFYi8g-jCkVM7aP676BAyYlH7Z3u04RAJH5Lu0AYLg

Response:(No headers)

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

Best How To :

For local development, I leaned on https://github.com/dropbox/dropbox_hook pretty hard to test everything. It's what I would recommend for local development of dropbox webhooks.

How to make dropbox authenticate a popup instead of redirect

javascript,dropbox,dropbox-api

See https://github.com/dropbox/dropbox-js/blob/stable/guides/builtin_drivers.md. client.authDriver(new Dropbox.AuthDriver.Popup({ receiverUrl: "https://url.to/oauth_receiver.html"})); and run this in your oauth_receiver.html: Dropbox.AuthDriver.Popup.oauthReceiver(); ...

Retrieve customer email from ID contained in webhook in Parse.com

javascript,parse.com,stripe-payments,webhooks

Did a quick skim of the docs pertaining to stripe, and it looks like the steps are: (1) make a stripe REST-api call from your client side to get a token, (2) pass that token to a cloud function, (3) call stripe from the parse cloud to finish paying. I...

Custom post-receive hook with gitlab

git,gitlab,webhooks

on the file so it is owned by the 'git' user. I have no git user on the webserver... all other git related files are owned by my user or root. That is because oyur webserver is a client of the GitLab server. The documentation you reference is for...

Is there a way to tell if a Dropbox chunk upload commit was successful?

ios,swift,dropbox-api

€dited: there are a couple of delegate methods you can use func restClient(client: DBRestClient!, loadedFile destPath: String!, contentType: String!, metadata: DBMetadata!) { NSLog("File DOWNLOADED successfully to path: %@", destPath); } func restClient(client: DBRestClient!, loadFileFailedWithError error: NSError!) { NSLog("File DOWNLOAD failed with error: %@", error) } func restClient(client: DBRestClient!, uploadFileFailedWithError error:...

Mulitiple Files upload to Dropbox by PHP API

dropbox,dropbox-api,dropbox-php

The Dropbox API does not currently offer any bulk or batch uploading, but we're tracking this as a feature request. That being the case, if you want to run this code in an async fashion, you can do so by running it in the background on another thread. There are...

Dropbox Sync api using multiple Activities

android,dropbox-api

Do not set a static variable on an Activity // do not do this! MovementDetection.mAccount=chosenAccount; When the user has linked to an account, it will stay linked in the lifetime of the app (until uninstalled or explicitly unlinked). When you wish to access Dropbox in other activities (after linking -...

iOS Dropbox Datastore API: WebKit Exception + Unsupported URL

dropbox-api

It turns out that the errors given by Xcode were a bit of a red herring in this case. I was firing an NSNotification after Dropbox finished authenticating, and in doing so I was using this: NSNotificationCenter.defaultCenter().addObserver(self, selector: "dropboxWasLinked:", name: "dropboxLinked", object: nil) ...but my dropboxWasLinked method wasn't set up...

Dropbox API Chooser with JS for multiple domains

ruby,dropbox,dropbox-api

The Dropbox Drop-ins API doesn't have any way of automatically adding domains, or registering any sort of wildcard, but we're tracking this as a feature request. For reference, one thing that does work, though it sounds like it may not apply to your scenario, is registering just, for example, example.com,...

Hosting images on Dropbox

asp.net,dropbox-api,cloud-hosting

As the other comments and answers say, a normal CDN is probably a better choice for this. For reference though, the Dropbox API does let you get publicly shareable links to files: https://www.dropbox.com/developers/core/docs#shares You can also modify these links as desired: https://www.dropbox.com/help/201 There's also a direct and temporary version: https://www.dropbox.com/developers/core/docs#media...

Store a box or dropbox file

java,google-app-engine,google-cloud-storage,dropbox-api,box-api

You don't say what you're trying to write to Cloud Storage, so I will assume you already have some content that you want to write, in which case the Google Cloud Storage Client API (javadoc) should give you what you're looking for. In particular, GcsOutputChannel. This allows you to write...

Stripe Cashier Webhooks

php,stripe-payments,laravel-5,webhooks,ngrok

With respect to the URI the local/test and production URIs are something like (assuming ngrok is used): Local/Test: http://3a4bfceb.ngrok.com/laravel/public/stripewebhooks Production: http://website.com/stripewebhooks The route in both cases would be: Route::post('stripewebhooks','Laravel\Cashier\[email protected]'); WebhookController.php (which is part of the Cashier package) handles all of the incoming events, so there is no need to create...

Dropbox Core API Java - cannot get folder size in metadata

java,dropbox,dropbox-api

To get the rest of the metadata, you'll want to cast to a DbxEntry.Folder: DbxEntry entry = client.getMetadata("/testFolder"); if (entry instanceof DbxEntry.Folder) { DbxEntry.Folder folder = (DbxEntry.Folder)entry; System.out.println(folder.toStringMultiline()); } But as Olivier pointed out, folders themselves do not have sizes in Dropbox. If you're interested in how big the files...

Signin to Dropbox using access token

c#,dropbox-api

So is it possible to use the access token manually obtained as in the second link to sign in to Dropbox? If this is your question, the answer is NO. You cannot. Dropbox states that in the documentation. Note that the generated access token only works for your own...

Setup Github Webhook for AWS EC2 server

github,http-post,webhooks

First you need to go to your repo, and click through this sequence: Settings -> Webhooks & Services -> Add webhook Then paste the url where github will submit data for each new commit. You can find examples of payload in example. Then implement the logic needed in the backend...

how to create slack incoming webhook using the api

webhooks,slack-api

Slack does not currently have an API to programmatically create webhooks, thought it is something we're planning on doing in the future. Until then, manually creating them is the recommended approach: https://my.slack.com/services/new

Dropbox API Token flow - no token in response

c#,oauth-2.0,dropbox-api

In the implicit flow, the access token is part of the fragment of the URL (the part after the hash). URL fragments aren't sent to the server. BTW, you might take a look at https://blogs.dropbox.com/developers/2014/04/dropbox-authorization-in-a-windows-forms-app/. If you're embedding a WebBrowser control anyway, there's no need to redirect to localhost at...

Webhooks with Contentful and node

javascript,node.js,express,webhooks,contentful

The contentful-webhook-server does not parse the req so that would explain why it does not deliver the body to you in the callback. Your server seem to be correct but it seems that contentful has a custom json type that is not recognized by the type-is library. the content-type looks...

Android Dropbox AccessToken

android,dropbox-api

The code you posted is for the Dropbox Android Core SDK, and the AndroidAuthSession constructor you're using is meant for OAuth 1 access tokens, but it sounds like you have an OAuth 2 access token. For reference, the Dropbox API currently supports both OAuth 1 and OAuth 2. Access tokens...

CORS support for dl.dropboxuserconent.com?

javascript,cors,dropbox-api

It seems to be working fine for me. Perhaps you can share the code you're using and the specific issue you're seeing: $ curl -i https://dl.dropboxusercontent.com/s/mrt5fei8gsndfqb/test.json -H Origin:www.example.com HTTP/1.1 200 OK accept-ranges: bytes Access-Control-Allow-Origin: * Access-Control-Expose-Headers: Accept-Ranges, Content-Range, X-Dropbox-Metadata, X-Dropbox-Request-Id, X-JSON, X-Server-Response-Time Access-Control-Max-Age: 600 cache-control: max-age=0 content-disposition: inline; filename="test.json"; filename*=UTF-8''test.json...

Get Uploader name

c#,dropbox,dropbox-api

The modifier field tells you who last changed the file, but only if the file is in a shared folder.

Dropbox API no longer working, CSRF mismatch

php,dropbox,csrf,dropbox-api,dropbox-php

I spoke to Dropbox API support. They were very helpful and suggested a number of things: This error indicates that the state value returned to your redirect URI doesn't match the CSRF token that was stored in the session. The state value on your sample redirect URI matches the state...

Check if file exists on Dropbox using Android Dropbox API

java,android,dropbox-api

Calling metadata and looking for an exception with a 404 response is probably the best way to check the existence of a single file in Dropbox. Depending on what you're trying to do, there are likely better approaches: If you're enumerating all files anyway (e.g. using delta), then there's no...

Sending a buffer to the client to download

node.js,express,dropbox-api

It looks like the dbox module you're using has a stream() option which is probably better suited for file downloads. You should also make a call to metadata to look up the file's mime type. For example: var middleware = function(req, res, next) { var client = DBoxApp.client(req.session.dbox_access_token); var file...

Dropbox file meta data from shared link

android,dropbox,dropbox-api

Unfortunately, no, there's currently no API for accessing file/folder metadata via Dropbox shared links. We're tracking this as a feature request though.

Load DropNet user token and secret from a database in a C# WinForms application

c#,dropbox-api,dropnet

SO I was almost there. It turns out all I had to do was create a new instance of DropNet client as opposed to a new UserLogin instance on the page load event! UserAccountManagerBLL accMan = new UserAccountManagerBLL(); UserToken = accMan.GetToken(Email); UserSecret = accMan.GetSecret(Email); _Client = new DropNetClient(appKey, appSecret, UserToken,...

Add Dropbox SDK to my app already running Chooser API, and is live on store

ios,dropbox,dropbox-api

You'll need to create a new app, but don't delete the old one. (Deleting the old one will break your existing app in the app store.) Once you've created the new app with the right permission, you can switch to using the new app key everywhere in your app (in...

Update Parse.com User from Stripe Webhook

javascript,wordpress,parse.com,stripe-payments,webhooks

Ok after some experimenting: create a webhook on in the Stripe Accounts area using the URL: https://**APPLICATION_ID**:javascript-key=**JAVASCRIPT_KEY**@api.parse.com/1/functions/update_user In your cloud code use the same function name as the final part of your URL. in my case update_user. Create a test version of the webhook and place this in your cloud...

How to write a case statement with nested JSON in rails

ruby-on-rails,json,webhooks

Probably case params[:result][:status] params[:result] returns a hash which contains, among other things, the "status" member that you can access with [:status] EDIT to answer UPDATE params[:result][:tracking_details] returns an array, so you could try any of the following: To get the first element: params[:result][:tracking_details][0][:status] params[:result][:tracking_details].first[:status] To get all the elements: params[:result][:tracking_details].map{|x|...

Dropbox issues not able to Upload a text file in Android

android,eclipse,dropbox,dropbox-api

Here is the Solution for the above question which is asked by me itself. String file_name = "/my_file.txt"; String file_path = Environment.getExternalStorageDirectory() .getAbsolutePath() + file_name; AndroidAuthSession session; public void initDropBox() { AppKeyPair appKeys = new AppKeyPair(APP_KEY, APP_SECRET); session = new AndroidAuthSession(appKeys); mDBApi = new DropboxAPI<AndroidAuthSession>(session); mDBApi.getSession().startOAuth2Authentication(ChatActivity.this); } Entry response; public...

Receiving webhook data and save them in db

php,webhooks

I had to use this: $json = file_get_contents('php://input'); $action = json_decode($json, true); As far as I understand the sjon request is not automaticly split into the $_POST. Thus you have to use the input itself. The true-parameter in json_decode is needed to get an associative array. Without it I only...

Does sharpbox use dropbox syc or datastore apis

dropbox-api,sharpbox

No, the SharpBox library uses the Dropbox Core API, not the Dropbox Sync SDK or Datastore API, and so it should not be affected.

Increase the limit of file upload size in Heroku while uploading to Dropbox

php,heroku,file-upload,dropbox,dropbox-api

To increase the file upload limit in Heroku while uploading to Dropbox, follow these steps: Create a file named custom_php.ini, preferably. Insert two attributes post_max_size and upload_max_filesize and set their value to the desired upload limit. (In my case, its 100M) Create a ProcFile and add this line web: vendor/bin/heroku-php-apache2...

can i use the “if” statement with the “else” part without the curly braces? [duplicate]

php,github,webhooks

In general, yes, you can use the else without curly braces. But it is exactly to avoid the confusion you are experiencing now that you should consider always wrapping your ifs and elses in curly braces anyway. It's a never ending discussion, so make your own decision. Here is why...

How to add values to a YAML hash using Ruby

ruby,hash,yaml,webhooks,hiera

There isn't much to using YAML in Ruby. I think you only need to know two methods in here : YAML.load and YAML.dump. Assuming the file is file.yml with the contents you provided : # YAML is part of the standard library. require 'yaml' # YAML.load parses a YAML string...

Dropbox SDK using PHP

php,dropbox,dropbox-api,dropbox-php

Are you sure your client id or client secret is correct? The error clearly says one of them is wrong.

Directory sandboxed access for Google Drive / Dropbox API / RemoteStorage apps?

html5,google-drive-sdk,dropbox-api

The Dropbox Apps API provides the ability to restrict any app using your API key to a single directory of your Dropbox account. So users could create an API key with access to a specific directory and then plug that into your app. However, that's not a user-friendly workflow. I...

Dropbox API Shared Folders

python,dropbox-api,shared-folders

I ran into this problem too. I suspect the Python API hasn't been updated to support the somewhat new /shared_folders REST API call. I managed to use the rest_client directly to access the /shared_folders API. Here is some example Python code, assuming you already have a DropboxClient object in "client":...

Reading Jira Webhook POST data

java,servlets,jira,webhooks

You have to read the response body, not the parameters map. For that purpose you can use request.getInputStream(); or request.getReader(); method. PS: You can configure the web hook to post data to http://requestb.in/ so you can easily analyze the request parameters, the request body, the headers, etc....

Simple php post hook on Bitbucket doesn't work

php,bitbucket,webhooks

Check user Please check if the webserver user is really apache. <?php echo exec('whoami'); ?> If it is not, check that the user have enough permissions. SSH keys Are the SSH keys for Bitbucket (deployment keys) available or are you using only key forwarding via SSH? Check output Please check...

Square-Connect Webhook PHP post no data

webhooks,square-connect

The square docs state that the POST body will be in JSON format, so PHP will not parse it like a form and populate the $_POST array. You need to do something like this: $json = file_get_contents('php://input'); $obj = json_decode($json); as described in the answers to Reading JSON POST using...

How to forward incoming mail to an HTTP endpoint?

email,http,webhooks,mailgun

The Mailgun Routes API will notify you, and also provide a URL where you can download the full email content. If that is not sufficient, you might want to look at SendGrid or Mandrill. I believe Mandrill POSTs the entire email data in their webhook....

Sync with Dropbox Core API

ios,dropbox-api

This is a relatively broad question, and the specifics will be very much dependant on each app. Dropbox doesn't offer a general guide for implementing sync like this, but I'll try to point to some useful resources. First, you'll probably want to use the iOS Core SDK (download, tutorial). Alternatively,...

How can I consume a Json Payload from a webhook and display certain features of the Json in vb.net MVC?

json,asp.net-mvc,vb.net,jira,webhooks

This is how I got the Json Payload from the Webhook URL: Function URLEndpoint() As ActionResult Dim r As System.IO.StreamReader = New System.IO.StreamReader(HttpContext.Request.InputStream) Dim jsonAs String = r.ReadToEnd() Dim issue As oject= JsonConvert.DeserializeObject(Of object)(json) System.Diagnostics.Trace.TraceError(json) Then create the classes to have the correct information from the Webhook: Public Class object...

How to handle Github Webhook in Java?

java,github,webhooks

Resolved, i used HttpServlet doPost method to fetch request, then from request i getReader() and read line so i can make JSONObject. My servlet is on page/Payload and Webhook is on http://server.com/page/Payload public class Payload extends HttpServlet { @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { StringBuilder...

How does a WebHook work?

php,http,paypal,stripe-payments,webhooks

Webhooks are a way to communicate with your application. With many APIs, you send them a request and the API response is included in the response to your request. But what if the request you make is asynchronous, or if for some reason the API you're using wants to be...

Is it possible to download or read a file list or directory list from dropbox and export to a file (txt)?

file,web,dropbox,dropbox-api

Yes, Dropbox offers an API that covers all of this functionality. For example: to list files: https://www.dropbox.com/developers/core/docs#metadata to download files: https://www.dropbox.com/developers/core/docs#files-GET to upload files: https://www.dropbox.com/developers/core/docs#files_put to share files via shared links: https://www.dropbox.com/developers/core/docs#shares There are also official SDKs available we recommend using: https://www.dropbox.com/developers/core...

Read and Write Dropbox Files without External Files

python,dropbox,dropbox-api

You can send strings directly to put_file. It doesn't have to be a file object: # ... insert example code in OP's SO link to get client object # uploading s = 'This is a line\n' s += 'This is another line' response = client.put_file('/magnum-opus.txt', s) And files received using...

How can I download for longer than three minutes with Dropbox?

ios,ios7,ios8,dropbox-api,background-task

Background tasks are, as you found out, severely restricted. A different way of solving this problem is by disabling the automatic lock of the ipad as soon as the download starts: [UIApplication sharedApplication].idleTimerDisabled = YES; Don't forget to re-enable the timers when download is complete to avoid excessive power usage....

loadStreamableURLForFile() in Dropbox iOS SDK does not return anything

ios,objective-c,dropbox,dropbox-api

In the Dropbox iOS Core SDK, the result of asynchronous calls like this get delivered via a delegate. See https://www.dropbox.com/developers/core/start/ios and the use of uploadedFile and uploadFileFailedWithError in particular to understand the delegate pattern. You should implement these methods (from DBRestClient.h) to receive the link: - (void)restClient:(DBRestClient*)restClient loadedSharableLink:(NSString*)link forFile:(NSString*)path; -...

How can I detect the particular given dropbox path is file or not using android core API?

android,dropbox-api

I found the snippet The isDir field on DropboxAPI.Entry tells you if the Entry is a file or folder. // Get the metadata for a directory Entry dirent = mApi.metadata(mPath, 1000, null, true, null); if (!dirent.isDir || dirent.contents == null) { // It's not a directory, or there's nothing in...