Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
dropbox api HTTP example
#3
Thank you!

I got the example working, but it seems I gave the wrong request, the request should have been: 'get_current_account'

EXAMPLE CODE FROM DROPBOX

Code:
Copy      Help
POST /2/users/get_current_account
Host: https://api.dropboxapi.com
User-Agent: api-explorer-client
Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxx
Content-Type: application/json

null

The body needs to be "NULL" I assume?
When I modify the example code I get the error.
Code:
Copy      Help
Error in call to API function "users/get_current_account": request body: expected null, got value

I read here how to change the body to NULL but none of the methods work:
http://stackoverflow.com/questions/2112 ... ll-in-json


RETURNS (from dropbox API)
Code:
Copy      Help
{
    "account_id": "dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc",
    "name": {
        "given_name": "Franz",
        "surname": "Ferdinand",
        "familiar_name": "Franz",
        "display_name": "Franz Ferdinand (Personal)"
    },
    "email": "franz@gmail.com",
    "locale": "en",
    "referral_link": "https://db.tt/ZITNuhtI",
    "is_paired": false,
    "account_type": {
        ".tag": "basic"
    },
    "country": "US"
}

What is the correct the syntax?


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)