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. 401 permission denied

    401 permission denied

    API
    4 2 489
    • 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.
    • Kung_fu_Panda
      Kung_fu_Panda last edited by

      I'm getting 401 while trying to make an API call via my web API in C#.

      When I paste the exact same URL in my browser it works.

      Does anyone know why?

      Thanks!

      1 Reply Last reply Reply Quote 2
      • moz_support
        moz_support last edited by

        Hey there Po!

        In cases like this we'd recommend double checking that your app is submitting the call correctly. If the call itself works but when the app performs it it doesn't, our first suggestion that it is an issue with the way the app is integrating. It's really difficult to troubleshoot third party app issues because you'd need to look at the code itself to diagnose the problem. You can send us the full call to help@moz.com if you like and we can check on that for you, but we would not be able to troubleshoot your app itself.

        1 Reply Last reply Reply Quote 1
        • Kung_fu_Panda
          Kung_fu_Panda last edited by

          Hi Lisa,

          Thanks! Though the problem is not with the app itself because if I switch the URL from the API one so some other random URLs, it works fine.

          I'm using it as such:

          chkStr = "https://lsapi.seomoz.com/linkscape/url-metrics/" + domainUrl + "?Cols=68719476736&Limit=10&" + authenticationStr; 
          using (WebClient client = new WebClient())
          {

          string htmlCode = client.DownloadString(chkStr);
          string[] temp1 = htmlCode.Split(":");
          string[] temp2 = temp1[1].Split("}");
          int da = int.Parse(temp2[0]);
          return da;
          }

          Obviously the call to DownloadString throws this exception.

          1 Reply Last reply Reply Quote 1
          • moz_support
            moz_support last edited by

            Hey there Po!

            We'd need the full call to the API to check on this, not the code from your app that assembles it. I would recommend sending that full call to use at help@moz.com to keep your data private. Thanks!

            1 Reply Last reply Reply Quote 1
            • 1 / 1
            • First post
              Last post
            • My DA dropped suddenly
              JuliyaHaly
              JuliyaHaly
              0
              3
              51

            • PA not showing
              seopack.org3edu
              seopack.org3edu
              0
              3
              41

            • How to remove bad or spammy links from Moz?
              adamsmith47
              adamsmith47
              0
              7
              154

            • Why Moz Giving Error, Permission Denied in Excel Sheets
              Umair123321
              Umair123321
              1
              6
              50

            • Page Authority 2.0 is coming soon!
              eli.myers
              eli.myers
              8
              29
              926

            • Get DA/PA Bulk Mode
              fktos.tam.906n
              fktos.tam.906n
              0
              4
              5.0k

            • Can the API Filter Links with Certain Anchor Text?
              Jgfbjvvnnvvvb
              Jgfbjvvnnvvvb
              0
              6
              325

            • Seo moz api request problem [401 error_message Your authentication failed]
              Moz.HelpTeam
              Moz.HelpTeam
              0
              2
              1.7k

            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