"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
-
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 -
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 -
API Access Change
I'm not sure, but I seem to remember that there was a certain number of API calls that USED to be included with my MOZ Pro level subscription and as I check it now, the API access is a separate subscription. Was there a recent change or has my memory finally started going?
API | | SWGroves0 -
Error when generating secret API key
Hi, I am trying to generate an API key for the past 24 hours and I keep on getting the same vague explanation (attached below) of the error. Help Hub had no responses regarding the error also. "Oops - Something went wrong while trying to get your API Credentials. Please try again or check out the Help Hub if you are still experiencing issues." Appreciate any assistance on solving this issue. Thanks! Ian
API | | kwaken0 -
Mozscape API - Keyword Rankings?
Hi, I'm using the free access to the Mozscape API and while I'm still a novice about what data the Mozscape API can pull I can't seem to figure how to pull the keyword rankings for my campaigns. I reviewed https://moz.com/help/guides/moz-api/mozscape/api-reference/url-metrics but can't seem to find what value I need to call. Can someone guide me in the right direction or is this something only the paid version has access to?
API | | FPK0 -
Can we get access to Moz's Rank Tracker via the API?
I'd like to be able to pull the results from Rank Tracker into my own application. Can I access it via an API? I don't see it anywhere in the Moz documentation, which is usually a clear answer. If not, how do you suggest to automate the inclusion of this data without, for example, being blacklisted?
API | | MB070 -
API: General information URL on path level
Is it possible to get general information (refdomains, mozrank etc.) out of the API on path level? If so, what is the best way to do this? Example www.test.com/folder/ -> Combined data (for example, total refdomains etc) for all URL’s indexed by Moz that include www.test.com/folder/ -> like www.test.com/folder/item/page.html and www.test.com/folder/page2.html
API | | MerkleNederland0