Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents



This article explains how to use APIs to creating PWA apps from a Master account available to partners.Contain FULL partner API, but you only need this API if you create apps in bulk integrated with your other software solution!!!


For standard Partner reselling of 1-5 apps a day it makes no sense to integrate this API, as it is quicker to create such apps manually. 


NOTE - THE API IS FOR WRAPPER ONLY FOR NOW. THE API FOR JS CAPSULE IS IN WORKS.

Overall steps

You will need to:

...

To receive JWT tokens, use the following API method with the login and password from your Mster account, an example:

GET https://ppp-admin.mbstmobsted.xyzcom/api/v8/[email protected]&password=12

...

Code Block
languagejs
GET https://ppp-admin.mbstmobsted.xyzcom/api/v8/auth?login=p@mobstedemail@mobsted.com&password=121234567


Where “ppp:

  • PPP-admin.

...

...

...

  • is the address of your server and your account at our server, provided by our team

...

  • "login" is the email you use to login into partner account
  • "password" is the password you use to login into partner account 


Receive access_token & refresh_token from response:

...

When sending the authenticated request, use it the ACESS_TOKEN in the auth header:

Code Block
languagejs
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJwcHAtYWRtaW4ubWJzdC54eXoiLCJuYmYiOjE1OTg0xxxxxxxxxxxxxxxxxxxxxywidWlkIjoiMmIzZTRiN2ItODVjOC00MzEwLWE4MTctM2FlMGJiYzQyMWJmIiwic3ViIjoiYXBpIiwib2JqdXVpZCI6IiIsInVzZXJ1dWlkIjoiMTdmZWU2YTUtZDk4My00OWZkLTg4OWMtMWI1NjlkMTg3YWNmIn0.eVOoDwJ7yh_TVb2j7FW7_jsTKT_SMJ8CFL10NX6RyXQ

...

Code Block
languagejs
POST https://ppp-admin.mbst.xyz/api/v8/partners

Type of parameters: raw (json)

An example:

{

    "email": "[email protected]"

}


Where, email is the email of who will access this new Client Account. It has to be a new unique email for every new sub account/tenant.

...

Code Block
languagejs
“url”: “https://a23r56k8-admin.mobsted.com”,

"authentication": {

     "email": "[email protected]",

                     "phone": "",

                          "password": "10ce7d73ae5fcc39g7064adc1ad03a03"

...

To use all other API methods, including to create an app in THAT NEW ACCOUNT, you need to receive JWT tokens for each of those accounts using the PRE-STEP above with address and login-password pair for that sub account.


____________

#2 Creating the

...

Wrapper Type App in Master or Client sub-account


Call this method in the context of either Master or Client account, depending on where you wish to create a PWA container app. Meaning - use address and auth tokens of the right account (Master or Client). Use only JWT tokens from method (A) above, for the targeted account.

...

  • unique ID of each app, so in case you wish to store matching pairs between your clients and container apps you could use “applicationId” or “id” (these are the same).


___________


#3 Searching for previously created sub-accounts/tenants


In case you create apps in sub accounts and do not store any info at your backend, you will need to create apps in it using those accounts login/pass pairs. To find the sub account you pre-created use the following method:

...