# Service Provider Access
# Mini Store Service Market Authorization Guide
# Non-Services Ignore This Section
# A. Purchase Authorization
Users purchase packages on the service marketplace while granting a Mini Store permission set to third-party platforms:
- If the Mini Store has not previously authorized the relevant permission set to the third party platform, then the third-party platform receivesAuthorization message callbackAfter, according to get AuthorizerAppid, Authorization Code and third-party platform owncomponent_access_tokenGenerationauthorizer_refresh_tokenThird party platforms need to save the authorizer_refresh_Token, used to get the user s authorizer_access_token。
- If the store has previously authorized the permission set to a third party platform, use the previously saved authorizer_refresh_A token will do.
- authorizer_refresh_If the token is lost, you can use thePull all authorized account informationGet your autorsizer back_refresh_token。
# B. Mini Stores trigger login
The Mini Store login process is divided into several steps:
- The user in the Mini Store management side in the purchase of services, select one of the click to use
- Mini Store management side generate code, and as a parameter stitched to the jump url 3) Third party platform to getcomponent_access_tokenWith the url parameter code request Mini StoreLogin interfaceAccess to User Information
- the third party to get the user information (appid), check whether the appid has been in the third-party account system, if not, trigger the registration, there is a direct login.
- callGet User Service ValidityInterface, obtaining the validity period of each specification service of the user and providing the corresponding service.
# C. Third party website direct login use
In addition to the Mini Store management side login, but also provide a third party own account system login way for merchants to use.