Forum Discussion

ankitgoel1987's avatar
ankitgoel1987
Contributor
12 years ago

Issues with Add Board rest API

Hi,

 

I am facing issues while trying to create a board via API (http://lithosphere.lithium.com/t5/rest-api/bd-p/developers-rest-api?leaf-id=Community.boards.add#Community.boards.add).

 

The query being posted is:

POST /restapi/vc/boards/add HTTP/1.1
Host: philadelphia.demo.lithium.com
Rest-User-Token: XXX
Cache-Control: no-cache

----WebKitFormBoundaryE19zNvXGzXaLvS5C
Content-Disposition: form-data; name="board.id"

6
----WebKitFormBoundaryE19zNvXGzXaLvS5C
Content-Disposition: form-data; name="board.title"

API Testing_Add Board_2
----WebKitFormBoundaryE19zNvXGzXaLvS5C

 

The api fails with this reponse:

error code=307
message: Invalid Cross-Origin Request. Request origin: 'chrome-extension://fdmmgilgnpjigdojojpjoooidkmcomcm' contains no matching allowed origin(s).

I am using POSTMAN, a Chrome extension plugin, to call the REST API's. Please note other queries like fetching messages are working absolutely fine.

 

Thanks,

Ankit

1 Reply

  • DougS's avatar
    DougS
    Khoros Oracle
    12 years ago

    The error you are seeing occurs when you make a “cross-origin” request (a request from another domain other than .the domain your community is on).  We block HTTP POST requests from other domains by default (a best practice for security – the browser blocks requests to different domains as part of the same-origin security policy), but a community can be configured to allow certain (or all) domains as part of our CORS support.  You can file a support ticket with the domains you would like to alllow cross-domain requests from and support can configure your site to allow requests from those domains.