0

I created a hello world action, could invoke it in the browser.

Invoking with curl and using the API key provided resulted in an error:

$ curl -u API-KEY -X POST https://us-south.functions.cloud.ibm.com/api/v1/namespaces/jps_LMI/actions/HelloWorld?blocking=true
{"code":"cd01b7ea690a0454ef05016daa917bd3","error":"The supplied authentication is invalid"}

Calling the unprotected request is working fine:

https://us-south.functions.cloud.ibm.com/api/v1/web/jps_LMI/default/HelloWorld.json 
jpsstack
  • 1,221
  • 4
  • 18
  • 29
  • Are you invoking that action as web action? Are you using a secret to protect it? – data_henrik Apr 16 '19 at 12:33
  • yes , I'm invoking it as web action, I think. I'm not using a particular secret, just the API key. – jpsstack Apr 16 '19 at 12:51
  • how did you create it? If you don't protect it, you don't provide anything. The API key is needed when invoking the action, not web action, from other environments. – data_henrik Apr 16 '19 at 13:06
  • 2
    https://cloud.ibm.com/docs/openwhisk?topic=cloud-functions-openwhisk_webactions#securing-web-actions – data_henrik Apr 16 '19 at 13:08
  • I created it in the browser following the instructions on this video https://www.youtube.com/watch?v=4Y24yR9Jg1s and then tried curl. some things look different, so there have been some changes, perhaps. I didn't notice anything about protecting so far. – jpsstack Apr 16 '19 at 13:16

0 Answers0