The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. API
    4. "403 Forbidden" is they will be displayed in the "API"

    "403 Forbidden" is they will be displayed in the "API"

    API
    4 2 437
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • yamayamax
      yamayamax last edited by

      Nice to meet you.
      Although the future API of the question of "URL Metrics", I want you to forgive me English is very immature thing.

      I'm very troubled now.
      If you call the "API" in the manner described below, such PHP of the program, "403 Forbidden" is the result.
      Because the information when you visit the URL directly is displayed, we suspect the PHP of the problem.
      About the cause, it will be saved in a very and Nowak advice.
      Whether Thank you.

      code

      $accessID = "<removed for="" privacy="">";
      $secretKey = "<removed for="" privacy="">";
      $expires = time() + 300;
      $SignInStr = $accessID. "\n" .$expires;
      $binarySignature = hash_hmac('sha1', $SignInStr, $secretKey, true);
      $SafeSignature = urlencode(base64_encode($binarySignature));
      $objURL = "http://www.google.com";
      $flags = "103079217188";
      $reqUrl = "http://lsapi.seomoz.com/linkscape/url-metrics/".urlencode($objURL)."?Cols=".$cols."&AccessID=".$accessID."&Expires=".$expires."&Signature=".$SafeSignature;
      $opts = array(CURLOPT_RETURNTRANSFER => true);
      $curlhandle = curl_init($reqUrl);
      curl_setopt_array($curlhandle, $opts);
      $content = curl_exec($curlhandle);
      curl_close($curlhandle);
      $resObj = json_decode($content); //decode the json object and fetch results
      echo $reqUrl . "
      ";
      echo "Domain Authority : " . $resObj->{'pda'};
      echo "Page Authority : " . $resObj->{'upa'};
      ?>
      ------------------------------------------------------------------------------------</removed></removed>

      1 Reply Last reply Reply Quote 0
      • JordanRailsback
        JordanRailsback last edited by

        Hi there!
        While I'm afraid I'm not able to help troubleshoot the code that's generating the call you're having trouble with, perhaps the folks over on our Mozscape Developer Discussion Group would be able to!

        If you'd like to either drop an example call in here or send a sample call over to help@moz.com, I can certainly help identify what call parameters might be causing the 403 response for that specific call. 🙂

        yamayamax 1 Reply Last reply Reply Quote 1
        • yamayamax
          yamayamax @JordanRailsback last edited by

          Thank you, "Jordan Railsback" Mr.
          Sorry, I did not notice the place to ask questions.

          Try to question in the coming "Mozscape Developer Discussion Group".
          We will try to also check the "help@moz.com"
          (It is really a simultaneous breach of manners in my country)

          Thank you for your kindness!

          JordanRailsback 1 Reply Last reply Reply Quote 0
          • JordanRailsback
            JordanRailsback @yamayamax last edited by

            It's no trouble at all, yamayamax! Happy to help any time 🙂

            1 Reply Last reply Reply Quote 1
            • 1 / 1
            • First post
              Last post
            • MOZscape API Signup "An unknown error has occurred"
              samantha.chapman
              samantha.chapman
              0
              2
              49

            • How can I get "Date First Seen","Date Last Seen" and "Date Lost" from the API?
              meghanpahinui
              meghanpahinui
              1
              2
              158

            • What does "ffspl" mean in a url-metrics result set?
              effectdigital
              effectdigital
              1
              3
              67

            • Paid access to the API
              LisaHunt
              LisaHunt
              0
              2
              165

            • Moz API "pib" Linking C Blocks metric returning "undefined"?
              jameskais
              jameskais
              0
              2
              152

            • Moz API, "Keyword Difficulty" and Bing Search Volume? And API "rows" and "requests"
              DavidLee
              DavidLee
              0
              4
              1.3k

            • Can't remove "insights" section from report.
              DavidLee
              DavidLee
              0
              3
              107

            • Will the MOZ API display
              SamWeber
              SamWeber
              0
              2
              86

            Get started with Moz Pro!

            Unlock the power of advanced SEO tools and data-driven insights.

            Start my free trial
            Products
            • Moz Pro
            • Moz Local
            • Moz API
            • Moz Data
            • STAT
            • Product Updates
            Moz Solutions
            • SMB Solutions
            • Agency Solutions
            • Enterprise Solutions
            • Digital Marketers
            Free SEO Tools
            • Domain Authority Checker
            • Link Explorer
            • Keyword Explorer
            • Competitive Research
            • Brand Authority Checker
            • Local Citation Checker
            • MozBar Extension
            • MozCast
            Resources
            • Blog
            • SEO Learning Center
            • Help Hub
            • Beginner's Guide to SEO
            • How-to Guides
            • Moz Academy
            • API Docs
            About Moz
            • About
            • Team
            • Careers
            • Contact
            Why Moz
            • Case Studies
            • Testimonials
            Get Involved
            • Become an Affiliate
            • MozCon
            • Webinars
            • Practical Marketer Series
            • MozPod
            Connect with us

            Contact the Help team

            Join our newsletter
            Moz logo
            © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
            • Accessibility
            • Terms of Use
            • Privacy