Archived topic — some details may be out of date.
Mock servers built from saved collection examples are still supported. Postman now also has code-based mocks: JavaScript request handlers plus a config.yaml, stored as files in your Git repository, which you can run locally or deploy. Create one in the app, or use the Postman CLI to generate one from an OpenAPI spec, collection or dataset (postman mock generate) and run it (postman mock run). See About mocks and Create a mock.
Working with an AI coding agent? The Postman plugin can build and run mocks for you.
For current help, see the Postman docs, try the free Postman tools (no account needed), or join us on Discord.
I’m trying to test Meta APIs on Postman mock servers. I tried to create a contextual response using the $queryParams template helpers to an example in my mocked collection as shown here.
It works when my query string key is simple text containing only alphabets. However, if my key has a dot (.) in it, it does not seem to work e.g. “hub.challenge”:
I’ve already tried using “hub\.challenge” and “hub.challenge” in the contextual response template but none works. If I change the key to something like “hubchallenge” instead of “hub.challenge”, then it works properly.
Does anyone have any idea or solution to this? Thanks.
I was just trying to do the exact same thing with Facebook webhook setup and ran into the same problem. After a couple hours of fighting with it, I stumbled on to this thread. Very frustrating to get stuck at step 1 of testing out some web hooks. Not sure if I’m more bothered by the fact that Facebook decided to include a ‘.’ in the query params, or that postman couldn’t handle it properly
I didn’t see a way to +1 the issue that was opened on Github, but would gladly do something there if it would get more attention on this one.