Comments (2)
@wmmihaa The problem with Postman is that it is built on Chrome, and Chrome is inserting additional headers. In particular it sets the Origin header. Due to the CORS implementation in IoTP, when the Origin is set by Chrome (to localhost maybe?), the request is forbidden because it does not match the allowed origin (https://[myorg].internetofthings.ibmcloud.com).
CORS support prevents malicious abusing of the session when logged into IoTP. Applications do not need to worry about this, because typically they would not set Origin header. eg. curl works fine:
curl --user 'apikey:token 'https://orgid.internetofthings.ibmcloud.com/api/v0002/device/types' -H 'Content-Type: application/json' --data '{"id":"mytype","classId":"Device"}'
Unfortunately you cannot specify the Origin header with Postman. You could try Advanced Rest Client (ARC) - https://chrome.google.com/webstore/detail/advanced-rest-client/hgmloofddffdnphfgcellkdfbfbjeloo
from docs.
@wmmihaa I hope that this response has helped you to resolve the issue you were having. If you have future queries, then a good place to go is developerWorks Answers, where you can ask a question and view other questions that have been asked. The link is here: https://developer.ibm.com/bluemix/support/
from docs.
Related Issues (20)
- Sample Bluemix-Watson Node.js visualization webapp doesn't show my devices HOT 3
- New Frankfurt region missing in the region selection HOT 1
- Update IBM Compose service list and region availability
- IoT Blockchain - consider splitting create/test vs deploy smart contract
- Add new region endpoints in secapps.md HOT 1
- Enrollment POST request I get ."error": "no response from server"
- OpenWhisk links to rest API docs broken HOT 2
- Improve clientId info for applications HOT 1
- Continuous Delivery Service APIs for automation?
- Blockchain Sample apps and tutorials Register screenshot is broken
- Internal search shows multiple results for chunked pages
- Under Functional security - Authorization
- Incorrect path in Application Publishing events section HOT 2
- No language section anymore to switch to a non-English doc
- Add VScode plugin and Atom Plugin for Globalization Pipeline
- Python documentation on virtualenv incomplete HOT 1
- Change OpenWhisk Swift 3 examples to use --kind swift:3.1.1 HOT 1
- Merge home page and `All Versions` of Bluemix CLI repo into docs
- Skill and job recommendation cloud project HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docs.