Using Postman
You can send complex HTTP requests to the backend server using the Postman API client. You can download Postman here.
To send a request through Postman, you can follow their
“Sending your first request”
tutorial. A sample BobaBoard URL to use is
http://localhost:4200/realms/slug/twisted-minds with the GET HTTP method.
You can find all the BobaBoard REST API endpoints in our Rest API documentation.
How to authenticate Postman requests
Section titled “How to authenticate Postman requests”Some requests to the BobaBoard API require authentication.
API endpoints that require authentication have “firebase” listed under the
AUTHORIZATIONS section in their documentation. They will also return 401 or
403 errors if accessed by an unauthenticated user.
Initial Setup
Section titled “Initial Setup”Before authenticating Postman requests, you will need to set up a Postman environment.
-
Follow the “variables in Postman” guide to set up a Postman environment.
-
Set up a
emailvariable in your environment with your BobaBoard login email. -
Set up a
passwordvariable in your environment with your BobaBoard login password. -
Set up a
firebaseApiKeyvariable in your environment with valueAIzaSyAYgQGhDsBS6rDKu8PVq_sAQrxt4tIrGEI. -
Create (and save) the following Authentication HTTP Request
-
Method:
POST -
URL:
https://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyPassword?key={{firebaseApiKey}} -
Body:
{"email": "{{email}}","password": "{{password}}","returnSecureToken": true}Format:
raw/JSON -
Tests:
This is the “Tests” tab in the postman request menu, near the Body one at the previous step.
postman.setEnvironmentVariable("authToken", pm.response.json().idToken);
-
Authenticating Requests
Section titled “Authenticating Requests”-
Run the Authentication HTTP Request request set up in the previous step. A successful response will contain an “
idToken” section with a very long string. -
Go to the request you want to authenticate.
-
Under the Headers tab, add a row with the following:
- Key:
Authorization - Value:
{{authToken}}
Your request should now have the correct authorization header.
- Key: