Comments

12 comments

  • Avatar
    Tim Whidden

    I've found that, though it's not documented, the REST API supports JSONP.

    Try it: subsitute .json for .xml and add "?callback=mycallback." Voila, there it is. 

    It would be nice to hear that it's officially supported before I start relying on it however...

     

  • Avatar
    Steven Yan

    Hi Tim, we do support JSONP in /api/v1, but have currently removed it in /api/v2 until we further investigate security.  We'll let you know if we decide to officially support it.

  • Avatar
    Steven Yan

    Update: we will be supporting JSONP for public resources, e.g. retrieving public forums or public forum topics.  Outside of that we do not feel it's secure and will add CORS support for other cross-domain requests.

  • Avatar
    Lars Morten Nygaard

    Hi.

    What's the latest on the CORS implementation mentioned above?

    LarsM

  • Avatar
    Steven Yan

    Hi Lars, nothing yet on CORS.

  • Avatar
    Lars Morten Nygaard

    Thanks for quick feedback.

    Does that mean no support for cross-domain in API v2 in any shape or form at the moment?

    Still plan to add CORS in the end?

  • Avatar
    Steven Yan

    Hi Lars, that's correct, currently there's no support for cross-domain requests in API v2 at the moment.  We still do plan on adding CORS.

  • Avatar
    Kleber Shimabuku

    Hi Steven, any news on this?

  • Avatar
    SendGrid Docs

    Doesn't seem like GET requests to /api/v2/portal/search.json support JSONP :(

  • Avatar
    Jacek Tomaszewski

    Why, oh why do you not provide CORS headers on some of the publicly accessible resources? Like:

    portal/search.json

    categories/{id}.json

    As CORS headers are present on forums, topics and so on, it seems that you forgot to put them also on search or categories...

    Please, be so kind and add them. API v2 is barely usable in current state

  • Avatar
    Sean Kinney

    @Jacek: I've created a ticket on your behalf so that we can have an engineer review the CORS trouble you're having. Thanks for reaching out about this.

  • Avatar
    Jacek Tomaszewski

    Thanks, Sean! I'm very glad and looking forward to hear from the engineers.

Please sign in to leave a comment.

Powered by Zendesk