11 Dec 2011

By - 1 Comments

Whilst creating my International SEO Backlink Analysis Tool, I wanted a way for people to use their SEOmoz API key in the same secure fashion as they would for their homebrew tools. That meant that their Secret Key shouldn’t be transmitted over the wire, but instead only a signed hash. You can read the docs on the SEOmoz API authentication, if you’re not familiar.

I created a simple Javascript function which generates the signed authentication hash. It’s very easy to use:

  1. var SEOmozCredentials =  getSEOmozCredentials(accessid, secret);
  2. var timeStamp = SEOmozCredentials['theTimeStamp'];
  3. var signature = SEOmozCredentials['signature'];

The parameters you must pass are the SEOmoz Access ID and the Secret Key. Once you have the timeStamp and signature, in addition to the Access ID you can easily form the request on the server side; here is some example PHP code:

  1. $credentials  = "AccessID=" . $accessID . "&Expires=" . $timeStamp . "&Signature=" . urlencode($signature);
  2. $apiURL = "http://lsapi.seomoz.com/linkscape/links/" . urlencode($url) . "?" . $credentials . "&SourceCols=5&TargetCols=0&Filter=external+follow&Sort=page_authority&Scope=page_to_page&Limit=1000";

Make sure you don’t transmit the Secret Key. You can grab the standalone Javascript file here: SEOmoz API Javascript.

You may want to consider, as an alternative to using JS in this way doing full SEOmoz Application Authorization.

One comment on “SEOmoz API Signed Authentication with Javascript
  1. Tool to Analyze Backlinks for International SEO « Business Leads « Get Business Leads

    […] There are only 3 fields you need to fill in, which are your SEOmoz Access ID and Secret Key and the URL of the page you wish to analyse. (Sidenote for those who care: Do not be concerned about entering your SEOmoz Secret Key; it isn't transmitted over the network but is used to generate an authentication hash for the API. If you want the code I made for this, see here). […]

  2. Bryon

    Content is very important but, if there is no inbound links
    it won’t get traffic from Google
    I will defo be coming back, its a great site!

  3. Haroldtig

    Ghostwriter akademische texte http://www.lindbladstudio.se/how-to-apa-format-in-word-2010 How to apa format in word 2010 Essay on man alexander pope
    Anschreiben kaufmann fГјr versicherungen und finanzen http://smulansdesign.se/persuasive-essay-writing-prompts-elementary Persuasive essay writing prompts elementary Bewerbungsschreiben ausbildungsplatzwechsel Bewerbung einzelhandelskauffrau ausbildung aldi
    Essay writing leaving cert http://smulansdesign.se/how-to-write-self-introduction-essay How to write self introduction essay Bewerbungsschreiben duales studium bwl handel
    How to save the environment essay spm http://www.friskvardare.se/bewerbungsschreiben-einleitung-ausbildung Bewerbungsschreiben einleitung ausbildung Essay body paragraph transition words
    Bewerbungsschreiben als verkäuferin mit berufserfahrung http://www.friskvardare.se/bewerbungsschreiben-ausbildungsplatz Bewerbungsschreiben ausbildungsplatz Spm english essay phrases
    Persuasive essays graphic organizers http://www.lindbladstudio.se/heading-for-college-application-essay Heading for college application essay Persuasive essay grading rubric middle school Bewerbung aushilfe einzelhandel mit erfahrung
    Heinrich mann politische essays http://www.lindbladstudio.se/essay-writing-prompts-for-6th-graders Essay writing prompts for 6th graders Five paragraph essay outline printable

  4. http://amdelmedical.com/forum/member/profile/20151126/376.php

    My friend
    The post is so helpful for me,i like it very much,thanks a lot!

  5. drvdhxllj

    SEOmoz API Signed Authentication with Javascript – Tom Anthony
    drvdhxllj http://www.g595gqcc09usx4cb0h7wt7z47349d8u9s.org/

  6. Jerrold

    Comprehending exactly what kind of hosting strategies are offered,
    as well as their respective advantages and restrictions,
    is a must.

  7. website

    Great topic and well written. Do you have any more resources about this that you reccommend?

  8. website

    Great topic and well written. Do you have any more resources about
    this that you reccommend?

  9. Thanh

    To be able to secure from these sort of strikes the google holding service providers
    offer safety and security software program to their customers.

Leave A Comment

Your email address will not be published. Required fields are marked *