cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Update: Find information on Dropbox support during COVID-19 here
Close
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

App Code and App Secret Input php curl

Explorer | Level 3

When I add the required app code and app secret for the 0auth2/token curl, should it be placed in the http header, or in the curlopt_postfields setopt? If it goes in the http header, should it be a seperate item in the array, or in my json encoded array with the other 3 parameters?

1 Accepted Solution

Accepted Solutions
Highlighted

Re: App Code and App Secret Input php curl

Dropboxer
Dropboxer

When calling /oauth2/token, you can actually pass the app key and secret either as 'application/x-www-form-urlencoded' (not JSON) POST parameters, or in the place of the username and password, respectively, in "HTTP basic authentication", that is, in the "Authorization" header. You can find more information on that in the /oauth2/token documentation:

https://www.dropbox.com/developers/documentation/http/documentation#oauth2-token

View solution in original post

4 Replies 4
Highlighted

Re: App Code and App Secret Input php curl

Super Collaborator | Level 20

Take a look here: https://www.dropbox.com/developers/documentation/http/documentation#authorization This is normal GET request, where all parameters are in the query.

Highlighted

Re: App Code and App Secret Input php curl

Dropboxer
Dropboxer

When calling /oauth2/token, you can actually pass the app key and secret either as 'application/x-www-form-urlencoded' (not JSON) POST parameters, or in the place of the username and password, respectively, in "HTTP basic authentication", that is, in the "Authorization" header. You can find more information on that in the /oauth2/token documentation:

https://www.dropbox.com/developers/documentation/http/documentation#oauth2-token

View solution in original post

Highlighted

Re: App Code and App Secret Input php curl

Explorer | Level 3

So, I would have a element in my httpheader array that looks like "Authorization: " . $appkey . ":" . $appsecret where the appkey colon appsecret are base 64 encoded? The element I have now is a utf8 encoded $appkey . ":" . $appsecret without "Authorization:" to the left of the string.

Highlighted

Re: App Code and App Secret Input php curl

Dropboxer
Dropboxer

I see you opened a new thread for this with more information so I'll follow up with you there.

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?