Giter VIP home page Giter VIP logo

Comments (2)

slaupster avatar slaupster commented on July 18, 2024

@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.

CaroMac avatar CaroMac commented on July 18, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.