Max_T
16 أغسطس 2022، 8:42ص
1
curl -X POST https://content.dropboxapi.com/2/sharing/get_shared_link_file
–header "Authorization: Bearer "
–header "Dropbox-API-Arg: {"path":"/Prime_Numbers.txt","url":"Dropbox - Error
{
“path”: “/Prime_Numbers.txt”,
“url”: “Dropbox - Error ”
}
hello I have this curl code. Has anyone ever used it? I’m having trouble getting a link to the file. probably the bug is in the part where I need to insert json code
Jon
16 أغسطس 2022، 9:26ص
2
Hey @Max_T ,
I have not tried it, does the command work if you run it in curl?
Max_T
16 أغسطس 2022، 9:43ص
3
in general, I was wrong because this is the code.yes but not work.
curl -X POST https://api.dropboxapi.com/2/sharing/create_shared_link_with_settings
–header "Authorization: Bearer "
–header “Content-Type: application/json”
–data “{"path":"/Prime_Numbers.txt","settings":{"access":"viewer","allow_download":true,"audience":"public","requested_visibility":"public"}}”
Jon
16 أغسطس 2022، 9:46ص
4
Have you sent the Bearer value as well and just removed it?
Max_T
16 أغسطس 2022، 9:52ص
5
the automation connects to the dropbox because I can get the file list. while there is a problem in the jet json part I think
Max_T
16 أغسطس 2022، 10:07ص
6
“httpCode”: “401”,
“description”: “missing_scope/.”
Jon
16 أغسطس 2022، 10:08ص
7
So that could do it, You may need to add an extra scope when you get your token. Looks like you will need sharing.write.
Do you also have a Prime_Numbers.txt file in the path you are sending?
Max_T
16 أغسطس 2022، 10:32ص
8
I replace it with /SZOtestowe/Polonez.jpg
Max_T
16 أغسطس 2022، 11:39ص
12
to connect I used: App key, App secret because it’s easier to insert. However, I do not know how to insert an access token in n8n with a dropbox
Jon
16 أغسطس 2022، 11:41ص
13
It looks to be ok, I wonder why Dropbox is saying you are missing a scope. Did you create a new token after adding the sharing.write scope?
Max_T
16 أغسطس 2022، 11:46ص
14
Does it matter if I don’t use an access token? Basically yes, to be sure, I can do it again.
Jon
16 أغسطس 2022، 12:13م
15
Looking at the Dropbox documentation you will need some kind of access token for the request to work.
Max_T
16 أغسطس 2022، 12:27م
16
How do I have to configure the http module to be able to use the dropbox access token?
Jon
16 أغسطس 2022، 3:23م
17
Best option would be to use the OAuth2 credential type so something like this…
Then in your HTTP Request node you can use that credential and it should automatically handle a lot of the more complicated bits.
Max_T
17 أغسطس 2022، 11:19ص
19
I set the same but unfortunately I got a 404 error on the connection itself
Jon
17 أغسطس 2022، 12:56م
20
Is that when it redirects or at another point like running the workflow?
Max_T
18 أغسطس 2022، 6:12ص
21
I think so. How do I insert all the elements and press the button to connect to the dropbox.