Skip to content

Instantly share code, notes, and snippets.

@joshpetit
Last active March 26, 2024 08:18
Show Gist options
  • Save joshpetit/4f24ad7b824753dca08d6f05ffcf5ddf to your computer and use it in GitHub Desktop.
Save joshpetit/4f24ad7b824753dca08d6f05ffcf5ddf to your computer and use it in GitHub Desktop.
Firebase emulator REST API request examples
var fetch = require('node-fetch');
(async () => {
await fetch(
`http://localhost:9099/identitytoolkit.googleapis.com/v1/accounts:signUp?key=fakeapi`,
{
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
email: "[email protected]",
password: "pass1234",
returnSecureToken: true,
}),
}
);
})();
curl 'http://localhost:9099/identitytoolkit.googleapis.com/v1/accounts:signUp?key=fakeapi' \
-H 'Content-Type: application/json' \
--data-binary '{"email": "[email protected]", "password": "pass1234", "returnSecureToken": true}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment