DropBox Access Token Generator

Use this procedure to create valid Access Token for your DropBox client application.

Stage 1

Go to https://www.dropbox.com/developers/apps/create and create Dropbox Platform app (Dropbox API app). You will get access key and access security code. Fill them down in provided fields.

Save Access Key and Access Secret. You will need them later if you have to regain access to the same application.

1) { $appInfo = new dbx\AppInfo(\trim ($m_access["key"]), \trim($m_access["secret"])); $webAuth = new dbx\WebAuthNoRedirect($appInfo, "PHP-Example/1.0"); $authorizeUrl = $webAuth->start(); ?>

Stage 2

Open:

Click [Allow] to allow authorization. You should be logged in to do so.

Site will show you authorization code. Copy it and paste below.

Stage 3

Access Token will now be calculated. If error occurs. Check error info. Usually error occurs if you try to generate Access Token with already used Authentication Code. If that is case, go to stage 2 and get new Authorization Code.

finish($m_access['auth_code']); ?>

Use this Access Token in your application to access Dropbox.

getMessage(), "\n"; $accessToken = 'Invalid! Go back to Stage 2 and try again.'; } ?>

Access Token: