Skip to content

plotly_POST sharing="secret" not working #441

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lucacerone opened this issue Jan 29, 2016 · 9 comments
Closed

plotly_POST sharing="secret" not working #441

lucacerone opened this issue Jan 29, 2016 · 9 comments
Labels

Comments

@lucacerone
Copy link

When I publish a plot (created with ggplot2 and ggplotly) to my company self hosted plotly using
plotly_POST(p, filename="a_plot", sharing="secret")

I then have to go manually to my plotly file, click on the share link, and enable the secret sharing which I think is not what should happen.

I also tried to use "hidden" as the error message doesn't agree with the documentation.

@cpsievert
Copy link
Collaborator

Does the plot post successfully as a public figure? What do you see if you enter plotly:::verify("username") and plotly:::verify("api_key") in your R console?

@cpsievert
Copy link
Collaborator

Oh, and since you have your own domain, make sure you've set this environment variable: Sys.setenv("plotly_domain"="https://plotly.your-company.com")

You can check the value with Sys.getenv("plotly_domain")

@cpsievert
Copy link
Collaborator

Actually, I think I found a bug, pushing a fix shortly.

@cpsievert cpsievert added the bug label Jan 29, 2016
@lucacerone
Copy link
Author

Hi Carson, I'll run the verify stuff on Monday. However public worked fine
and all the environment variables are set.
On Jan 29, 2016 6:31 PM, "Carson" [email protected] wrote:

Oh, and since you have your own domain, make sure you've set this
environment variable: Sys.setenv("plotly_domain"="
https://plotly.your-company.com")

You can check the value with Sys.getenv("plotly_domain")


Reply to this email directly or view it on GitHub
#441 (comment).

@lucacerone
Copy link
Author

Oh OK :) then thanks for the quick fix!
On Jan 29, 2016 7:09 PM, "Carson" [email protected] wrote:

Actually, I think I found the bug, pushing a fix shortly.


Reply to this email directly or view it on GitHub
#441 (comment).

@lucacerone
Copy link
Author

anyway, I installed the commit 6eafd16
but when I use plotly_POST and use share="hidden", the figure is created as private and I have to click on the arrow and check the box saying "enable private share link". I don't think the commit fixed the issue.

In case it helps I also get these message:

Error in curl::curl_fetch_memory(url, handle = handle) : 
  Couldn't resolve host name
In addition: Warning message:
In plotly_POST(x = p, filename = "r_tests/boh", fileopt = "overwrite",  :
  world_readable is no longer supported. Instead, set the sharing
argument to "private" (you must be logged in to access),
"hidden" (anybody with the obscured URL can access) or "public"
(anybody can view).

Despite the message the plot is created correctly in our enterprise plotly installation.

@cpsievert
Copy link
Collaborator

Previously I was trying to infer API endpoints from the plotly_domain environment variable, but going forward, you'll be able to configure both the plotly domain and the API domain

Sys.setenv("plotly_domain" = "https://plotly.your-company.com")
Sys.setenv("plotly_api_domain" = "https://api-plotly.your-company.com")

@cpsievert
Copy link
Collaborator

@royr2 could you update https://plot.ly/r/getting-started/ to reflect this new environment variable? ^^^

@royr2
Copy link

royr2 commented Feb 1, 2016

Okay done...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants