Zoho Creator REST API / Unable to generate Refresh and Acess Token

Zoho Creator REST API / Unable to generate Refresh and Acess Token


I've been following this video, but it doesn't do anything. This is my code:

  1. $client_id = '1000.DVWESFDFGH1UI51RA0GHGHHDXTSOM2F';
    $client_secret = '9e7a518438be1cfb456b6ce92fc2ij3kj20c67b';
    $code = '1000.2626eccb001d3b6859b5c4ab9456ccfb.dccd2d8a876ddc92be381231235ac14346e';
    $base_acc_url = 'https://accounts.zoho.com';
    $service_url = 'https://creator.zoho.com';

    $token_url =  $base_acc_url . '/oauth/v2/token?grant_type=authorization_code&client_id=' . $client_id. '&
    client_secret=' . $client_secret . '&redirect_uri=http://localhost&code=' . $code;

    generate_refresh_token($token_url);

    function generate_refresh_token($url){
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_POST, 1);
        $result = curl_exec($ch);
        curl_close($ch);
        print_r($result);
        return $result;
    }
Am I doing something wrong?

      Zoho SalesIQ Resources



            Zoho TeamInbox Resources

              Zoho DataPrep Resources


                  Zoho CRM Plus Resources

                    Zoho Books Resources


                      Zoho Subscriptions Resources

                        Zoho Desk Resources

                          Zoho Projects Resources


                            Zoho Sprints Resources


                              Qntrl Resources


                                Zoho Creator Resources


                                  Zoho WorkDrive Resources




                                      Zoho Campaigns Resources

                                        Zoho CRM Resources

                                                    Design. Discuss. Deliver.

                                                    Create visually engaging stories with Zoho Show.

                                                    Get Started Now


                                                      Zoho Show Resources


                                                        Zoho Writer Writer

                                                        Get Started. Write Away!

                                                        Writer is a powerful online word processor, designed for collaborative work.

                                                                  有料プランをご利用の方