I’m trying to integrate the Chargebee portal into my site. It’s pretty straightforward as you just have to include a script in your header, and then add a button that when clicked does SSO into their portal. I included the header script on the page, and also tried globally.
I tried using Custom HTML to paste this code in, but nothing is happening when I click the link. Any idea on how to properly implement this line of code in Weweb?
Code added with global settings or page settings is not loaded in the editor but it will load in the live app. Probably this is the reason your link it’s not working.
If you want it to load in the editor you can try inserting the script into an html element and see if it works, see here as well.
Yeah I tried in my published application, it just opens a new tab straight back to weweb. In terms of custom module, haven’t really built anything like that, big learning curve, but will look into it.
I think you may be right, it looks like i need to initiate the session, right now it’s prob just kicking back nothing.
I need to make this REST API call in WeWeb, any idea on how to translate what’s shown here into a REST request? I can’t seem to get the AUTH working. (Keys are just dummy)
Ah good catch, OK so fixed that, but what is odd is that I’m getting API authentication failed ‘Invalid API Key’ - But what is odd is that I’m using that same key in Insomnia to test the API, and it’s working just fine. Is there any formatting that needs to be done on the value outside of Basic key:
I also noticed these different content types, would this just be default in most cases?
I guess you should find all the details in the documentation of the API you are calling.
Do you have a way to export the details of the request from Insomnia?
Good news, I was able to get Authentication working. What I found was that it appears Insomnia is encoding the API key to something else before sending, when I use that encoded key which Insomnia API spits out in Weweb, it works.
The only thing I’m trying to figure out at this point is passing parameters which doesn’t appear to work. I’m trying to pass this -d customer[id] value, but doesn’t appear to be taking it.