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 Help with API Error: "Query Not Found" for a Specific URL
Hi everyone, I'm trying to retrieve data for a specific URL using the Moz API, specifically the data.site.metrics.fetch method. The URL I'm querying is: https://www.fiftyfiveandfive.com/ai-agents-marketings-new-means-of-production When I make the API request, I receive the following 404 error: { "id": "unique-id-testing", "jsonrpc": "2.0", "error": { "code": -32655, "status": 404, "data": { "key": "site_query.query", "value": "https://www.fiftyfiveandfive.com/ai-agents-marketings-new-means-of-production" }, "message": "That query was not found." } } However, when I check the URL in Moz Link Explorer, I can see that the page has a Page Authority of 23 and a Domain Authority of 36, but no backlinks or ranking keywords. What I'm Trying to Achieve:
API | | Chris_Wright1664
I’m attempting to retrieve metrics for this page via the API, but it seems like the API does not recognise the URL, even though it’s visible in Link Explorer. Questions: Why does the API return "Query Not Found" for a URL that is indexed in Link Explorer? Is there a way to request Moz to crawl or re-crawl this URL to ensure it's accessible via the API? Are there any additional criteria the API requires (e.g., backlinks, ranking keywords) before it recognises a URL? Additional Info: I’ve verified that my robots.txt file allows all bots, including Rogerbot. list itemThe page is included in the sitemap, and the URL is accessible without any restrictions. list itemI’d appreciate any insights on how to resolve this issue or steps to take so that the Moz API can retrieve data for this URL.0 -
Unsolved Can links tracking lists help to crawl high authority backlinks by Moz 2024
Hi i am create a link tracking list for my domain, but Moz don,t crawel after 2 weeks completed.
API | | Rawaluij1 -
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 -
MOZ API - metadata permission error
Hi there, I have a small issue using MOZ API. I cannot make successful GET request for metadata (index stats). The request looks like this: http://lsapi.seomoz.com/linkscape/metadata/index_stats?AccessID=mozscape-XXXXXX&Expires=1497442682&Signature=XXXXXX. In my most recent request, I got an error message: "Permission denied: pckgmhkomakbnflgmckhobiiojjmomjpph". Did I forget something? Signed Authentication should be OK, because it works with other endpoints, such as "url-metrics", "links" etc. Thanks in advance! Kind regards, Zoran
API | | Databox-apps1 -
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