IBM / Ionic-MFP-App

This repository contains instructions to develop a secure, enterprise-grade Ionic/Cordova based hybrid mobile app that connects to CouchDB/Cloudant and ObjectStorage via IBM Mobile Foundation service.
https://developer.ibm.com/patterns/develop-hybrid-mobile-app-with-cloud-native-back-end/
Apache License 2.0
15 stars 25 forks source link

IBM Cloud Object Storage adapter response is no content #23

Closed venugopal60 closed 6 years ago

venugopal60 commented 6 years ago

i followed steps to connect object store response is no conent Please check response

Curl curl -X GET --header 'Accept: application/json' 'http://localhost:9080/mfp/api/adapters/MyWardData/objectStorage' Request URL http://localhost:9080/mfp/api/adapters/MyWardData/objectStorage Response Body no content Response Code 401 Response Headers { "date": "Thu, 17 May 2018 07:42:48 GMT", "www-authenticate": "Bearer", "x-powered-by": "Servlet/3.1", "content-length": "0", }

shivahr commented 6 years ago

Error code is 401 - Unauthorized. Did you follow "Step 3.2 Create Service ID and API Key for accessing objects" and then "Step 5.4 Specify Cloud Object Storage credentials in MFP Adapter" ?

shivahr commented 6 years ago

Also, how are you trying to run the adapter? Through MFP console or via command line?

Did you create confidential client as per "Step 6.3 Test the MyWardData adapter"?

If you are testing via command line, then you first need to generate an authorization token as per instructions in https://mobilefirstplatform.ibmcloud.com/tutorials/it/foundation/8.0/adapters/testing-and-debugging-adapters/#using-postman and then specify the same in your command line

curl -X GET --header 'Accept: application/json' --header 'Authorization: Bearer <your authorization token>' 'http://localhost:9080/mfp/api/adapters/MyWardData/objectStorage'
shivahr commented 6 years ago

Closing issue for now as there is no response. Please reopen in case the issue is still there.