1

I want to print share's Link from a file using API dropbox = python
My code:

import requests
import json

url = "https://api.dropboxapi.com/2/sharing/create_shared_link"

headers = {
    "Authorization": "Bearer ACCESS_TOKEN_REDACTED",
    "Content-Type": "application/json"
}

data = {
    "path": "/132005.jpg"
}

r = requests.post(url, headers=headers, data=json.dumps(data))

Now i want to get url to share like:

https://www.dropbox.com/s/o3hniburr4byytu/132005.jpg?dl=0

What print??? Thank bro

2

1 Answer 1

1

Possible options you can check or try out.

print r.json()
print r.content
print r.text
print r.status_code
Sign up to request clarification or add additional context in comments.

2 Comments

thank you, it worked, so i just want show url of share's link
it worked, SO i just want get one field in json, thanks bro

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.