Error 401 Unauthorized connecting with Marvel API
Asked Answered
api
A

3

5

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!

Ashlieashlin answered 25/6, 2019 at 13:49 Comment(1)
I wasn't allowed to attach a print to my post, sorry for that.Ashlieashlin
L
4

enter image description here

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

Lippi answered 3/6, 2021 at 1:13 Comment(2)
I already lost a couple of days of struggling with this API. It works, thank you!Endor
This answer helped. Thanks. * will allow requests from any host.Telpher
C
2

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

Calcify answered 10/9, 2019 at 16:29 Comment(0)
B
0

Was having the same issue and I just created a new account on marvel with a different email and it worked straight away. Maybe as I had not used the API key in a while it because dis-activated or something.

Brummett answered 30/4, 2023 at 19:33 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.