Skip to main content

Unable to make REST calls to my CPanel plugin

Comments

5 comments

  • cPanelMichael
    Hello :) Could you review Guide to API Authentication - Software Development Kit - cPanel Documentation and let us know if the information is helpful? Thank you.
    0
  • jwineman
    Hey, I'm not trying to hit a CPanel API, I'm trying to hit my own API. I have an "endpoint" that I made that lives at:
    0
  • jwineman
    Okay the issue was my request body was malformed. Sorry to waste your time :) I'm a little confused as to why CPanel didn't let it through but thats okay.
    0
  • cPanelMichael
    Okay the issue was my request body was malformed.

    I am happy to see you were able to address the issue. Thank you for updating us with the outcome.
    0
  • jwineman
    Just kidding, request body was properly formed. Root cause was the cookie wasn't been set in the header and firefox automatically adds it in without telling me which is why my browser requests worked and code requests failed: Isomorphic-fetch specific fix is to add credentials: 'same-origin' to your init. How do I use window.fetch() with httpOnly cookies
    0

Please sign in to leave a comment.