M2AV Posted October 25, 2021 Share Posted October 25, 2021 (edited) Site URL: https://www.m2avc.com Hi, I'm working on an integration with a major Air Conditioning company and to authorize my app I need to have a redirect URL that will display the authorization code. They recommend PHP but I can't use PHP with Squarespace. Does anyone have any ideas of where I could begin to look for how to do something like this inside the Squarespace sandbox? The example response is below. It uses a 302 redirect with query components. I need to pull out just the code, format, and display it in a web page for the client to copy and paste into an app. In this example the code is 12A3456BCD789123. Thank you all in advance. HTTP/1.1 302 Found Location: yourApp://authCode? code=12A3456BCD789123& state=a1bcd2fgh3ijkLm4opQRST Edited October 25, 2021 by M2AV Clarification Link to comment
Wolfsilon Posted October 25, 2021 Share Posted October 25, 2021 Hi, Does this authorization only apply to the client you're working with? Is the app intended will it be handling requests from consumers on Squarespace as well? I'd probably try and handle resolving requests externally, server-side, and then serve your response to the destination where the request was made. If I understand this correctly, it would be on Squarespace so you could do this via an embed or iframe is something. Link to comment
M2AV Posted October 26, 2021 Author Share Posted October 26, 2021 So, when on Carrier's website, a user will input their cloud credentials and "Allow" my app to connect to their account. When they subm their info, Carrier will redirect to a URL of my choosing but I need to be able to display the code that's in the 302 redirect. The user will copy that and paste it into my app to grant access. Link to comment
paul2009 Posted October 26, 2021 Share Posted October 26, 2021 Squarespace is a 'website builder', and whilst this means that you can produce a professional-looking website very easily without technical knowledge, it also means that you are unable to access backend code (like PHP) where something like this would need to be integrated. About: SQSP User for 17 yrs. Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥. Work: Founder of SF Digital, building Squarespace Extensions to supercharge your commerce website. Content: Links in my posts may refer to SF Digital products or may be affiliate links. If my advice helped, you can thank me by clicking one of the feedback emojis below. I love coffee too. Link to comment
AxelOjeda Posted January 17 Share Posted January 17 If I cant do any backend in squarespace could i just do it elsewhere and redirect here? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment