![]() ![]() After the user allows our application, Dropbox will redirect the user to our callback url we specify on step #5. For this process, we need to define our callback url in which Dropbox will redirect the users after allowing the access.Ħ. From the step #4, we only need the "oauth_token" to request for authorization. You can save these information in your session so that you will retrieve it later when performing access token. Parse the output and you will get the "oauth_token" and "oauth_token_secret" below which will be use to perform authorization. ![]() Execute post request using curl, which is the basic command in performing post request.Ĭurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE) Ĭurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE) Ĭurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1) Ĭurl_setopt($ch, CURLOPT_POSTFIELDS, $param) Ĥ. Once we have all the parameters, lets compose the post request.ģ. $timestamp = time() $nonce = md5(time()) Ģ. Since we are using plaintext signature method, the signature will be your app secret plus "%26". Lets request for a token from the request token url. Once we have the credentials and the api url's, we are now ready to start byġ. We need this in performing oauth request.įor the sake of this post, we will use the PLAINTEXT signature method, which is the simplest signature method. The access token url will be use to get an access token which will be use to access users credentials in their behalf.Īnother thing that we need to understand is how to create signature. The authorization url will be the page for users to allow our application to access the users credential. ![]() The request token url will be use to get a token which will be use to authorize your app to access users information in their behalf. We also need to understand the 3 url's that we need to access to complete the authentication process as listed below. We need the credentials below to proceed: To start with, you need an API credentials which you can get by logging in to your Dropbox account and create an app on this url. This is basically built from scratch which I want to share with you all, who wish to integrate with Dropbox. Please take note that I'm not using any library to perform this integration nor special coding or whatsoever. This post will teach you how to integrate with Dropbox OAuth using PHP platform. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |