401 permission denied
-
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!
-
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!
-
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.
-
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.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Unsolved Empty Response from API v1
Hi, I always receive a empty reponse from your API v1. Here ist my API call for further investigation:
API | | George4445
"http://lsapi.seomoz.com/linkscape/url-metrics/https://www.moz.com/?AccessID=mozscape-1234567890&Expires=1719916530&Signature=generatedsignaturecode" Reponse: {} Do you experience some problems with the api? Thank you very much
Regards George Shaylen0 -
Unsolved Regarding Moz API token password update
Hi, In March we have updated password for MOZ API and used in our application it worked, but currently the updated password is not working and in the MOZ site the old password is shown and its active. We are using Legacy username and password.
API | | NickAndrews
We see that 5 tokens can be added for API, if we add 2 tokens both will be active.
We are currently using free services. Please help us resolve this issue.0 -
Unsolved Generate an Access ID and API key
Hello, I can't generate an Access ID and API key for my account.
API | | OlegShavilov
I need a Links API and I'm ready to buy a paid subscription, but I can't do it. Link https://moz.com/products/mozscape/access
Redirected to https://moz.com/api/dashboard And i dont see any options for create Access ID0 -
Unsolved "The account does not have access to that quota" - API v1 URL Metrics
Hi! On one of our servers we get the message "The account does not have access to that quota" when pulling data for v1 URL Metrics endpoint in the API.
API | | aheitzman
This only happens on one specific server, others have worked flawlessly. Any idea of what might be going on? Thanks0 -
Unsolved Api limits on free plan
Good afternoon. I tried connecting free access to api https://moz.com/help/links-api/v1-archive/v1-free-api-access to retrieve DA data. After several requests to the api I got a message: "Your monthly row limit reached" Can you tell me what this error is related to? Or Moz doesn't have free api access anymore?
API | | Dima124dsfg1 -
Moz api request problem fail (status 401)
Hello! I'm getting an error for seomoz call using API: {"status":"401","error_message":"Your authentication failed. Check your authentication details and try again. For more information on signed authentication, see: http://apiwiki.moz.com/signed-authentication"} Can you help me?
API | | leoh0