@movmo_app/api
v1.8.2
Published
A JavaScript SDK for calling Movmo's backend API
Readme
@movmo-app/api
This package provides functions to easily call Movmo's backend API.
Default Configuration
By default, the API packages uses the E2E (pre-production) endpoint as the baseUrl and reads the API key from the environment variable REACT_APP_MOVMO_API_SECRET.
Overriding the baseUrl
You can override the baseUrl by setting the REACT_APP_MOVMO_API_URL environment variable or by using the setConfig method.
Note: the Movmo backend API URLs can be found in your admin dashboard.
Example: Using Environment Variable
REACT_APP_MOVMO_API_URL=https://custom-api-url.comExample: Using setConfig
import { setConfig } from "@movmo-app/api";
setConfig({ baseUrl: "https://custom-api-url.com" });Setting the apiKey
You can set the apiKey by setting the REACT_APP_MOVMO_API_SECRET environment variable or by using the setConfig method.
Note: the API secret to authenticate when calling Movmo's backend API can be found in your admin dashboard.
Example: Using Environment Variable
REACT_APP_MOVMO_API_SECRET=yoursecret12345Example: Using setConfig
import { setConfig } from "@movmo-app/api";
setConfig({ apiKey: "yoursecret12345" });