• Instructions to Ask a Question

    Click on the "Ask a Question" button and select the application for which you would like to ask questions.

    We have 5 different products namely - Pabbly Connect, Pabbly Subscription Billing, Pabbly Email Marketing, Pabbly Form Builder, Pabbly Email Verification.

    The turnaround time is 24 hrs (Business Hours - 10.00 AM to 6.00 PM IST, Except Saturday and Sunday). So your kind patience will be highly appreciated!

    🚀🚀Exclusive Discount Offer

    Just in case you're looking for any ongoing offers on Pabbly, you can check the one-time offers listed below. You just need to pay once and use the application forever -
     

    🔥 Pabbly Connect One Time Plan for $249 (🏆Lifetime Access) -  View offer 

    🔥 Pabbly Subscription Billing One Time Plan for $249 (🏆Lifetime Access) - View offer

Webhook data >> TXT file in Dropbox folder

Status
Not open for further replies.

Praveen

Member
I want to create a plain text file in a Dropbox folder using the data from a webhook.

How can I do this without having to set up Google Sheets or some other external app?
 
P

Pabblymember11

Guest
Hey @Praveen

Seems like it is not possible since to upload a text you need a base where you can store the data, you cannot skip the creation of a file.

But if you use such a trigger application that converts the text file directly to the link then only you can forward the file to upload to DropBox.
 

Praveen

Member
@Supreme Can you please check these posts, it seems possible:



Need more instructions to set up though.
 
P

Pabblymember11

Guest
Hey @Praveen


The user might have added a third action step of some application to generate the file.


And the above API call is manually been created by the user to upload a file on DropBox.
 
@Supreme and @Pabbly

I recently was able to create a TXT file in dropbox using the Pabbly API connecting to DropBox as mentioned in this thread.

However it appears DropBox switched to short-lived access tokens (and optional refresh tokens). So I can get it to work but then after 4 hours the Bearer Token expires...

From Dropbox: "Apps can still get long-term access by requesting "offline" access though, in which case the app receives a "refresh token" that can be used to retrieve new short-lived access tokens as needed"

Ideally we would just get a dropbox action that can upload a TXT file without having to go through the API...

However is there a way for PABBLY to handle getting the refreshed token or is there a better way to achieve this?

7. Retrieve a new short-lived access token whenever needed like this, e.g., using curl on the command line: (plug in the refresh token from step 5 in place of "REFRESHTOKENHERE", the app key in place of "APPKEYHERE", and the app secret in place of "APPSECRETHERE")

curl https://api.dropbox.com/oauth2/token \
-d refresh_token=REFRESHTOKENHERE \
-d grant_type=refresh_token \
-d client_id=APPKEYHERE \
-d client_secret=APPSECRETHERE

8. Use the returned short-lived access token to make API calls until it expires. For example, here's how a call to get the connected user information would look like: (plug in the new access token from step 7 in place of "ACCESSTOKENHERE")

curl -X POST https://api.dropboxapi.com/2/users/get_current_account \
--header "Authorization: Bearer ACCESSTOKENHERE"
 
P

Pabblymember11

Guest
Hey @MasterMagic

However is there a way for PABBLY to handle getting the refreshed token or is there a better way to achieve this?
You can refer to the following developer's guide on how you can manage the refresh token in your integration.

 
Thanks for this. I was able to setup the app and that is working - but its a little confusing how to use it to get to an end result.

Would I use the app to get a refresh token? Or would I use the app to handle posting the data I was previously doing with the API directly?

I had it all setup with the existing api action so was hoping to just pass a new bearer token I would obtain from the dropbox app but can't seem to figure out how to accomplish this...
 
Last edited:
P

Pabblymember11

Guest
Would I use the app to get a refresh token? Or would I use the app to handle posting the data I was previously doing with the API directly?
As we can see from our end the application is added to the platform correctly and it wouldn't be required to generate a refresh token.

So, kindly try the action step accordingly and check.
 
Hello - so I do have this all working - and it does work and correctly uploads the text file to dropbox. But then it tells us after a few hours that it has expired.
{
"error_summary": "expired_access_token/...",
"error > .tag": "expired_access_token"
}
If we reconnect it works again - but I'm pretty sure this has to do with dropbox requiring the 'app' to request a short-lived access token?

So I'm guessing our app will need to request a refresh token and store that as part of a step - and then use that as the bearer token for the actual task?

I have attached how I have it setup right now - any advice would be appreciated!


Screenshot of Google Chrome (1-18-23, 12-44-08 PM).jpg
 

Attachments

  • Screenshot of Google Chrome (1-24-23, 5-37-24 PM).jpg
    Screenshot of Google Chrome (1-24-23, 5-37-24 PM).jpg
    909.4 KB · Views: 57
  • Screenshot of Google Chrome (1-24-23, 5-41-03 PM).jpg
    Screenshot of Google Chrome (1-24-23, 5-41-03 PM).jpg
    323.5 KB · Views: 66

Chetali

Administrator
Staff member
Hey @MasterMagic!

You need not have to pass the "token_access_type=offline" in the Parameter field instead of this kindly pass the query parameter in the Authorize URL field itself.

1674796061767.png
 

Attachments

  • 1674796178632.png
    1674796178632.png
    41.6 KB · Views: 69
Hey @MasterMagic!

You need not have to pass the "token_access_type=offline" in the Parameter field instead of this kindly pass the query parameter in the Authorize URL field itself.

View attachment 20908

Hey @MasterMagic!

You need not have to pass the "token_access_type=offline" in the Parameter field instead of this kindly pass the query parameter in the Authorize URL field itself.

View attachment 20908
Thanks - I totally forgot I had actually tried this too. Here is my last attempt... That also did not seem to stay permanent... I also tried passing parameters for this:

token_access_type
grant_type
refresh_token

It all takes but then still shows as expired after 4 hours.

Screenshot of Google Chrome (1-27-23, 10-04-00 AM).jpg

Screenshot of Google Chrome (1-27-23, 10-04-13 AM).jpg
 
P

Pabblymember11

Guest
Hey @MasterMagic

We have made a slight change from our end and it should work now. Also, make sure you are using a new connection to use the application.

Further, if you have some other requirements then kindly let us know we will try to add those stuff from our end.
 
Status
Not open for further replies.
Top