Marvel API

So I found that Marvel have an API.

Marvel API


I converted them to version 2 as I only have 2.7 on my machine atm

Convert from 3 to 2

3to2 -w


The Authorisation page shows:

ts: 1

Public Key: 1234

Private Key: abcd

making: 1abcd1234

hash: ffd275c5130566a2916217b101f26150


I created a Mac App to create the Hash and create this URL.

NSTimeInterval timeStamp = [[NSDate date] timeIntervalSince1970];
// NSTimeInterval is defined as double
NSNumber *timeStampObj = [NSNumber numberWithDouble: timeStamp];
txtTimestamp.stringValue = [timeStampObj stringValue];

I call this in the app and it doesn’t work.

NSURLErrorUserAuthenticationRequired = -1013
NSURLErrorDomain Code=-1013

I can’t get the MD5 from Python to match the ObjC one.

I can’t get it to work with CocoaRestClient or ObjC.

Then I realise I’ve got my keys swapped, d’oh!

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: