How do I call the REST API for an Action using IBM Cloud's Function in Postman?

136 views Asked by At

I have created an Action using IBM Cloud's Function service to query against a Cloudant database. I am able to verify that the code is working when I invoke it. I would like to also verify it using Postman. See image below for endpoint details

enter image description here

After research, I learned to generate a bearer token with Postman. enter image description here

For the API key, I created a Cloudant service credential and used the api key provided there. enter image description here

I then try to call the REST API provided from the Action's Endpoint section. Based on the Curl section and a youtube video (https://www.youtube.com/watch?v=9JgSQ4J6TkQ), I composed my call to have the authorization defined in the header with the value of "Bearer " enter image description here

Finally, it says I'm not authorized for my Action's endpoint. Not sure where I went wrong. I've also tried placing my bear token in Postman's Authorization > OAuth2.0 and Bearer Token. Both yield the same results.

Thanks.

0

There are 0 answers