Load Login Page v2
This API loads the URL address for the Hive web login where users actually can log in. When a user is logged in, the redirect URL set by the app developer, the state
and the authorization token for logic verification are returned. The supported IdP accounts are Hive, Google, Facebook, and Apple accounts.
- Request URL
Commercial Server URL https://weblogin.withhive.com/login?param= Sandbox URL https://sandbox-weblogin.withhive.com/login?param=
- Request Header
HTTP Method GET Content-Type text/html
- Query Parameters
Field Name Type Description Required param string The param string value is created through URL encoding and BASE64 encoding of the JSON data composed of the key values in the table below.
Y
- Query Parameters –
param
Field Name Type Description appid string Application ID used by Hive gindex string Game Index information used by Hive. App Center > Game List > Search your game and click it > Click the AppID tab > Click the game’s AppID > Check the Basic Info tab to get the Game Index. url string This is the URL address to redirect to after the completion of the user login. It should be the same URL as the redirect URL set in the Hive console. country string the country code set by the game or community. If this value is not provided, the web browser default value is used. language string the language code set by the game or community. If this value is not provided, the web browser default value is used.
- Request Example
12345678// the original param composed of JSON object. The string value obtained by performing URL encoding and BASE64 encoding sequentially on this JSON object is used as a query parameter when calling the API.{"appid":"com.com2us.hivesdk.ios.community.global.normal","gindex":"539","url":"https://community.withhive.com/hivesdk/login/redirect","country":"KR","language":"ko"}12// Call the API attaching the encoded param to the request URL as a query parameter.https://weblogin.withhive.com/login?param=JTdCJTIyYXBwaWQlMjIlM0ElMjJjb20uY29tMnVzLmhpdmVzZGsuaW9zLmNvbW11bml0eS5nbG9iYWwubm9ybWFsJTIyJTJDJTIyZ2luZGV4JTIyJTNBJTIyNTM5JTIyJTJDJTIydXJsJTIyJTNBJTIyaHR0cHMlM0ElMkYlMkZjb21tdW5pdHkud2l0aGhpdmUuY29tJTJGaGl2ZXNkayUyRmxvZ2luJTJGcmVkaXJlY3QlMjIlMkMlMjJjb3VudHJ5JTIyJTNBJTIyS1IlMjIlMkMlMjJsYW5ndWFnZSUyMiUzQSUyMmtvJTIyJTdE
- Response Body
Returns the redirect URL provided in the API request with the “res” attached as a query parameter. See the description below for an explanation of res.
Field Name Description Type Required URL the redirect URL provided in the API request with the “res” attached as a query parameter string Y
- Response Sample
12// If https://community.withhive.com/hivesdk/login/redirect was set as the redirect URLhttps://community.withhive.com/hivesdk/login/redirect?res=JTdCJTIyY29kZSUyMiUzQSUyMjEwMCUyMiUyQyUyMnN0YXRlJTIyJTNBJTIyMTY4ODEwODkyNzk0Mi1CUHVxcHFFaUd6S0lIJTIyJTdE
- Response Body –
res
The
res
is obtained by converting the JSON object composed of the key values below into string via the URL encoding and the BASE64 encoding. To use a JSON object, do the BASE64 decoding and then the URL decoding. The JSON object is shown below.Field Name Description Type code Response code (100: success) string state the token to be used in Verification v2 string
- Response Sample –
res
1234{"code": "100","state": "1627881984263-jkx1B3GOY3EsJ"}