"403 Forbidden" is they will be displayed in the "API"
-
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> -
It's no trouble at all, yamayamax! Happy to help any time
-
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!
-
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.
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
-
Unknown data items in Links API response
So I'm on the documentation page at https://moz.com/help/links-api/making-calls/url-metrics . I've copied the bit fields table into a spreadsheet. I've removed all the "deprecated" items and have totalled up the remaining items making a Cols= value of 182537205900657000. For want of better knowledge, I've used that same value for LinkCols=, SourceCols= and TargetCols=. The request url ends up being (anonymized): http://lsapi.seomoz.com/linkscape/links/fordanddoonan.com.au?Cols=182537205900657000&AccessID=xxx&Expires=1557458487346&Signature=xxx&SourceCols=182537205900657000&TargetCols=182537205900657000&LinkCols=182537205900657000&Limit=1000&Scope=page_to_domain&Filter=external My question is, what do I make of all the extra fields that I get in the json packet what should I do to remove them? These extra fields are: lrid, lsrc, ltgt, luufq, luueid, lufeid, luujid, luumrp, luumrr, luflan, lufspf, lufsplc, lufspp, lufsps, lufspsc, luus, lufuid, lupuid, lufipl, luupa, lupda, luued, lufed, luped, lupib, luulc, flan, fspf, fsplc, fspp, fsps Is it simply a case of limiting the values of TargetCols, LinkCols and SourceCols? If so, to what?
API | | StevePoul1 -
What does "ffspl" mean in a url-metrics result set?
So I've got this server-side JScript object I've declared which works nicely for us. var mozObj = new MozInteraction()
API | | StevePoul
.setMethod("GET")
.setHost("http://lsapi.seomoz.com")
.setPath("linkscape/url-metrics")
.setCols(parseInt("11111111111111111111111111111111111111111111111111111", 2))
.setLines(10)
.setAccessId(accessId)
.setSecret(secret)
.setExpires((new Date()).addDays(1).valueOf())
.generateSignature(); etc etc The setCols call sets the Cols value to the maximum possible: 9007199254740991. The weird thing is that in the JSON response I get a whole pile of column names that I can't find descriptions for in the documentation at https://moz.com/help/links-api/making-calls/response-fields e.g. ffspl1 ffspl2 ffspl3 ... fuspl0 fuspl1 fuspl2 fuspl3 ... pfspl0 pfspl1 pfspl2 pfspl3 ... puspl0 puspl1 puspl2 puspl3... etc1 -
Can't remove "insights" section from report.
The items in the "insights" section of the Moz report have an "x" which can be clicked in the designer to dismiss this data from the report. Â However, these items still shows up in the report anyways. Â Buggy. Â How can we work around this bug?
API | | Webformix0 -
How to pull metrics from API for a top 100 list
I'm working on a top 100 list for my industry and need a way to pull DA for the list of blogs and then sort them in descending order until it can pull other metrics (Alexa and follower count). Right now I am doing the above manually and was trying to hunt for a way for the table to update on a set date. any help / guidance appreciated
API | | ArfanB0 -
How to best use MOZ api?
i love the idea of the api - but need a tool to access it. having seen the seogadget excel addin, but unable to use it with my MAC. Do you have a recommendation for using api without writing my own code? Thanks, in advance!
API | | robertdonnell0 -
Can any of the MOZ APIs give me the top 10 google results for a keyword?
I'd like to feed a list of keywords into the Moz API and get back a list of the websites that appear on the first page for that keyword. Can anyone tell me if this is possible?
API | | amchapel0