Postman API Tutorial -> 404 with access_token


#1

Hey guys,
Im trying to use the API, but Im having troubles getting the access token through postman.
I followed the existing tutorial (I think it should work for 2.0.1 too?), but Im getting a 404 “Page not found” everytime I try to run the access token call.
I set up the envoirnment, as shown in there.
Im using the cms version 2.0.1 running on IIS (Windows 10) like in the IIS tutorial
XMR and everything else works fine.
I double checked URL Rewriting and Post Max Size.

Edit: Other calls return a 400, for missing a parameter (obviously), so its not a problem with all the calls.

This is my first post, I hope I did everything correctly :wink:


#2

Yes, indeed.

Could you show me the screenshot of your Postman with the access token call please?

Perhaps it’s something simple like double // (ie the CMS address in Postman environment has / and then in the call you add another one) - assuming you’re using environment variables of course.

Example:


#3

It looks like this for me:


Automating API Calls with Powershell access_token?
#4

I wonder if postman is not using the {{url}} variable that you want.

The page found implies an issue with the call url.

If you’d put the whole URL instead of {{url}} (ie replace it by yourself), does that work?


#5

That sadly yields the same result:

I also dont think that this is the issue as something like this gives something back:


#6

I have now set up what will become our production Server. Everything worked normally during the Install, yet I get the exact same error in Postman. I set up a new application in the cms, changed the envoirnment variables in postman accordingly.
It doesnt matter if Im trying to connect through Postman or through the browser.
I can access /api/ , but obviously I get the error 400, /api/authorize/ yields error 404 and /api/authorize/access_token gets an 404 too.
All the rewrite rules are setup correctly, is there anything I can still try? Im just doing something wrong, but I cant find what :frowning:


#7

on /api in browser you’d expect to see 400 with
{ "error": { "message": "The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the \"access token\" parameter.", "code": 400, "data": [] } }

I’ve seen one similar problem, also with IIS, could you take a look at those posts and see if it helps with your problem? API Call through Postman


#8

That actually did the trick for me! Thanks a lot. I will now play around with the api and ask if there any more questions :slight_smile: