Message Boards Message Boards

Avoid URLExecute of CloudDeploy API to keep asking for login?

Posted 6 years ago

Hello,

I created a simple API and deployed it to CloudAPI using Mathematica 10.1.0 and deployed it. It's Private by default. When I try to use it via URLExecute, I always get a response that I need to login even though I have already done that via the CloudConnect function when it pops up the authentication dialog.

I have tried providing the same login credentials I use to login to the Wolfram Cloud as the arguments to URLExecute as well (I put ... in place of them here in the example code) and that does nothing. I've created a PermissonsGroup with my username in it hoping that would help, but it did't. Since I created the API function and cloud deployed it and I'm the owner and from what I read in the docs, I shouldn't have to provide the login creds but that's moot as even if I do it still won't run the function for me. If I change the functions Permissions to "Public" then I can call it just fine, but I need it to be private. So I'm stuck and any help or explanation would be greatly appreciated.

Below are my notebook code and the responses so you can see what I'm trying to do.


In[1]:= CloudConnect[]

Out[1]= "..."

In[3]:= func = APIFunction[{"x" -> "Integer"}, FactorInteger[#x] &];

In[4]:= APIFunction[{"x" -> "Integer"}, FactorInteger[#x] &]

Out[4]= APIFunction[{"x" -> "Integer"}, FactorInteger[#x] &]

In[5]:= api = CloudDeploy[func]

Out[5]= CloudObject["https://www.wolframcloud.com/objects/ab5a5cc1-\
e101-4200-8858-ca45072b1085"]

In[6]:= URLExecute["https://www.wolframcloud.com/objects/ab5a5cc1-\
e101-4200-8858-ca45072b1085", 
{"x" -> "10"}, 
"Username" -> "...",
"Password" -> "..."
]


Out[6]= "Sign In with Your Wolfram ID  

Email      
Password      
Remember me      
Sign in    
Forgot your password?         Don't have a Wolfram ID? Create one .   \
© 2018 Wolfram Research, Inc. | Terms | Privacy | Support"

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract