Introduction
There are several methods that a user can use to sign in to the Buzzebees system.
- Login with Username/ Password
- Login with UID
- Login with Facebook
- Login with Apple
- Login with Line
- Login with Google
Every methods have to be configured in Buzzebees system before it's usable.
Login with Username/ Password
This refers to the common way of logging into an application using an email and password.
curl --location --request POST 'https://buzzebees-dev.azure-api.net/api/auth/bzbs_login'
--header 'Content-Type: application/x-www-form-urlencoded; charset=utf-8'
--header 'Ocp-Apim-Subscription-Key: '
--header 'Ocp-Apim-Trace: 1 '
--header 'App-Id: '
--header 'Authorization: token '
--form 'username=""'
--form 'password=""'
--form 'app_id=""'
--form 'authorization_code=""'
--form 'client_version=""'
--form 'device_noti_enable=""'
--form 'id_token=""'
Login with UID
This refers to using a UID (Unique Identifier) for logging into a system, where the UID serves as a unique key that does not overlap with those of other users.
Additional information: It is recommended to use the UUID (Universally Unique Identifier) of the device.
curl --location --request POST 'https://buzzebees-dev.azure-api.net/api/auth/device_login'
--header 'Content-Type: application/x-www-form-urlencoded; charset=utf-8'
--header 'Ocp-Apim-Subscription-Key: '
--header 'Ocp-Apim-Trace: 1 '
--header 'App-Id: '
--header 'Authorization: token '
--form 'uuid=""'
--form 'app_id=""'
--form 'device_app_id=""'
--form 'os=""'
--form 'platform=""'
--form 'mac_address=""'
--form 'device_noti_enable=""'
--form 'client_version=""'
--form 'device_token=""'
Login with Facebook
This refers to using Facebook for logging into a system, where it is necessary to use the tokenString obtained from Facebook Login. Once the tokenString is obtained, the API Login With Facebook should be called.
curl --location --request POST 'https://buzzebees-dev.azure-api.net/api/auth/login'
--header 'Content-Type: application/x-www-form-urlencoded; charset=utf-8'
--header 'Ocp-Apim-Subscription-Key: '
--header 'Ocp-Apim-Trace: 1 '
--header 'App-Id: '
--header 'Authorization: token '
--form 'access_token=""'
--form 'uuid=""'
--form 'app_id=""'
--form 'device_app_id=""'
--form 'os=""'
--form 'platform=""'
--form 'mac_address=""'
--form 'device_noti_enable=""'
--form 'client_version=""'
--form 'device_token=""'
Login with Apple
This refers to using an Apple ID for logging into a system. It is necessary to use the authorizationCode and identityToken obtained from Authentication Services when requesting permission. Once permission and data are obtained from the ASAuthorizationControllerDelegate, the API Apple Token should be called.
curl --location --request POST 'https://buzzebees-stg.azure-api.net/api/auth/apple_token'
--header 'Content-Type: application/x-www-form-urlencoded; charset=utf-8'
--header 'Ocp-Apim-Subscription-Key: {Subscription-Key}'
--header 'Ocp-Apim-Trace: 1 '
--header 'App-Id: {App-Id} '
--header 'Authorization: token {token}'
--form 'app_id=""'
--form 'authorization_code=""'
--form 'client_version=""'
--form 'id_token=""'
After that, the API will send back the refreshToken and idToken, which should then be used for calling the API Login With Apple.
curl --location --request POST 'https://buzzebees-dev.azure-api.net/api/auth/apple_login'
--header 'Content-Type: application/x-www-form-urlencoded; charset=utf-8'
--header 'Ocp-Apim-Subscription-Key: {Subscription-Key}'
--header 'Ocp-Apim-Trace: 1 '
--header 'App-Id: {App-Id} '
--header 'Authorization: token {token}'
--form 'refresh_token=""'
--form 'client_version=""'
--form 'device_noti_enable=""'
--form 'id_token=""'
--form 'platform=""'
--form 'app_id=""'
--form 'device_token=""'
Login with Line
This refers to logging into a system using Line. Before using this method, the Line Login SDKs must be set up and utilized in accordance with the respective platform. Once a user logs into the system using Line SDKs, they receive an id_token, which should then be used for calling the API Login With Line.
curl --location --request POST 'https://buzzebees-dev.azure-api.net/api/auth/line_login'
--header 'Content-Type: application/x-www-form-urlencoded; charset=utf-8'
--header 'Ocp-Apim-Subscription-Key: '
--header 'Ocp-Apim-Trace: 1 '
--header 'App-Id: '
--header 'Authorization: token '
--form 'uuid=""'
--form 'app_id=""'
--form 'os=""'
--form 'platform=""'
--form 'mac_address=""'
--form 'device_noti_enable=""'
--form 'client_version=""'
--form 'line_access_token=""'
--form 'authorization_code=""'
--form 'id_token=""'
Login with Google
After successfully logging into the system, the user receives a token and various user data, which can be used for other functions or features in a complete manner.