Error 401 Unauthorized connecting with Marvel API

Viewed 1624

I've created a new account to use the Marvel API's, but I'm having some trouble to make calls to it.

I've generated a hash based on these parameters:

timestamp: 1561464418685
public key: 3e6f6a484529014f288cc251191b85d0
private key: 0e70d6990a8135b5409ede2cbab3a9e913c6b9c3

So I've concatenated the parameters into a single string like this:

15614644186850e70d6990a8135b5409ede2cbab3a9e913c6b9c33e6f6a484529014f288cc251191b85d0

and then applied MD5 hash, returning the following hash:

57d62328aea6fb144458312efbdf7989

and finally, the complete call:

https://gateway.marvel.com/v1/public/characters?ts=1561464418685&apikey=3e6f6a484529014f288cc251191b85d0&hash=57d62328aea6fb144458312efbdf7989

But the only return I'm getting is the following:

{"code":"InvalidCredentials","message":"This user is not allowed to use that service."}

I'm trying to make the request on browser(Chrome) and Postman.

Here is a print of my account configuration on Marvel Developer Panel, it seems that my user isn't really allowed to make the calls to the API, cause the number os API calls isn't displayed.

Any hint would be very useful.

Thanks a lot!

2 Answers

enter image description here

As @marcel-konjata noted, I changed my authorized referrers in my My Developer Account page. And it worked.

well Even if this a late answer: if you are developing from localhost, you need to add at the myDeveloperAccount at developer.marvel.com at "Your authorized referrers":

IP address at the one colon, add referer and another one is localhost (with asterisks)

found that by coincidence

Related