Remote Authentication for Support Desk - Script receiving 400

Remote Authentication for Support Desk - Script receiving 400

Currently trying to get this working from a development environment, redirecting to that URL from a different URL than the one provided in our Remote Login URL.

Script that is running:


> $ts = round(microtime(true) * 1000);
>
> $email = $this->getUser()->getEmail();
>
> $remoteauthkey = ''* removed>
>$fullname = $this->getUser()->getUser()->getName();
>
> $loginstripped = preg_replace('/[^a-z\d]+/i', '_', $fullname);
> $loginname = mb_strimwidth( $loginstripped, 0, 9).$this->getUser()->getUser()->getId();
>
> $operation = "signup";
>
> $utype = "portal";
>
> $inputlist = $operation.$email.$loginname.$fullname.$utype.$remoteauthkey.$ts;
> $inputlist = preg_replace('/\s+/', '',$inputlist);
>
> $apikey = md5($inputlist);
>
> $redirecturl = " https://support.easyrxortho.com/support/RemoteAuth?operation=" . urlencode($operation) . "&email=".urlencode($email) . "&ts=" . urlencode($ts) . "&fullname=" . urlencode($fullname) . "&loginname=" . urlencode($loginname) . "&utype=" . urlencode($utype) . "&apikey=" . $apikey . "&redirect=1";
>
>
> return $this->redirect($redirecturl);
>

At first there was some issues with the timestamp and we were getting error message 105 Request Delayed.

Now when I arrive at that redirected URL I get a 400 error in the console

    Access your files securely from anywhere

        Zoho Developer Community




                                  Zoho Desk Resources

                                  • Desk Community Learning Series


                                  • Digest


                                  • Functions


                                  • Meetups


                                  • Kbase


                                  • Resources


                                  • Glossary


                                  • Desk Marketplace


                                  • MVP Corner


                                  • Word of the Day



                                      Zoho Marketing Automation


                                              Manage your brands on social media



                                                    Zoho TeamInbox Resources

                                                      Zoho DataPrep Resources



                                                        Zoho CRM Plus Resources

                                                          Zoho Books Resources


                                                            Zoho Subscriptions Resources

                                                              Zoho Projects Resources


                                                                Zoho Sprints Resources


                                                                  Qntrl Resources


                                                                    Zoho Creator Resources



                                                                        Zoho Campaigns Resources


                                                                          Zoho CRM Resources

                                                                          • CRM Community Learning Series

                                                                            CRM Community Learning Series


                                                                          • Kaizen

                                                                            Kaizen

                                                                          • Functions

                                                                            Functions

                                                                          • Meetups

                                                                            Meetups

                                                                          • Kbase

                                                                            Kbase

                                                                          • Resources

                                                                            Resources

                                                                          • Digest

                                                                            Digest

                                                                          • CRM Marketplace

                                                                            CRM Marketplace

                                                                          • MVP Corner

                                                                            MVP Corner





                                                                              Design. Discuss. Deliver.

                                                                              Create visually engaging stories with Zoho Show.

                                                                              Get Started Now