cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

HTTP/1.1 301 Moved Permanantly error

HTTP/1.1 301 Moved Permanantly error

Descaii
Explorer | Level 3
-- code written in lua 

local http = require("socket.http") local ltn12 = require("ltn12") local json = require("json") local url = "https://api.dropboxapi.com" local data = {} local request = {http.request{ url=url, path = "/2/files/list_folder", method="POST", sink = ltn12.sink.table(data), headers = { ["Content-Type"] = "application/json", ["Authorization"] = "Bearer -secret code" }, source = ltn12.source.string(json.encode{ path = "", shared_link = { url = "secret link" } }) }} stuff["data"]=data require("Parse")(request)

I'm attempting to use a folder for a web library for my personal projects, but I can't get the HTTP request to work properly. I've tried many things, but it always returns with the Moved Permanantly error. Anyone have an idea of what's wrong?

1 Reply 1

Greg-DB
Dropbox Staff
I can't offer help with lua itself, but it looks like you may not have it configured to actually use https and so it's falling back to http. Dropbox API calls requires https though, so it is redirecting you to https.

It looks like there's more information about configuring https support in lua here:

https://stackoverflow.com/questions/8286677/https-request-in-lua
Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?