- Print
- PDF
Server to server settings
- Print
- PDF
Available in Classic and VPC
This page describes how to set the delivery of server to server requests for item provision and login validation.
Request purchased item
You can set to deliver HTTP requests through webhooks to proceed with the provision of items according to the purchase or use of coupons.
The following describes how to set the delivery of HTTP requests through a webhook for the item provision.
- Log in to the dashboard with the admin account.
- Click the Project settings > General menus, in that order.
- In the Purchased item (service) or Coupon item (service) field in the Webhook area, enter the HTTP/HTTPS URL by referring to the following guide.
- See Request and response after purchase for item provision after purchase.
- See Request and response after coupon use for item provision after coupon use.
- When providing items to test users, enter the request in the field marked with (Test user).
- Click the [Modify] button.
Request and response after purchase
Set HTTP request and response by referring to the following table and code.
- information
https://{domain}? userId={uuid}&orderId={orderId}&projectId={projectId}&platform={platform}&productId={productId}&store={store}&payment={payment}&transactionId={transactionId}&gamepotOrderId={gamepotOrderId}&uniqueId={uniqueId}&tp={tp}
Property Type Maximum length Description userId
String
128 User ID transactionId
String
512 Order number (GPA-xxxx-xxxx-) store
String
64 Store information ( apple
,google
,one
)projectId
String
128 Project ID productId
String
256 Product ID registered in Google Play Store, Apple App Store, and ONE Store platform
String
128 Operating platform information ( android
,ios
)payment
String
64 Payment method uniqueId
String
512 Unique ID ( uniqueId
entered when calling purchase API)gamepotOrderId
String
512 GAMEPOT Order ID serverId
String
- serverId ( serverId
entered when calling purchase API)playerId
String
- playerId ( playerId
entered when calling purchase API)tp
Integer
- 1: test payment
0: regular paymentetc
String
- etc ( etc
entered when calling purchase API)
- Response
{ "status": 1, "message" : "" }
Property Type Description status
Integer
Result value
0
: failure,1
: successmessage
String
Error message
Request and response after gifting and coupon use
Set HTTP request and response by referring to the following table and code.
information
https://{domain}? userId={userId}&projectId={projectId}&platform={platform}&store={store}&userData={userData}&itemId=[{itemData}, {itemData}, ...]
Property Type Maximum length Description userId
String
128 User ID ( all
if the Game > Gift > Target value in the dashboard is All)projectId
String
128 Project ID platform
String
128 Operating platform information ( android
,ios
)store
String
64 Store information ( apple
,google
,one
)title
String
- The value entered in Dashboard > Game > Gift > Title content
String
- The value entered in Dashboard > Game > Gift > Description target
String
- GAMEPOT Dashboard > Game > Gift > Target value - All: all/User ID: user expireMs
String
- The value's timestamp entered in Dashboard > Game > Gift > Expiration date (GMT+9) userData
String
- The value entered in the second parameter when calling the client SDK coupon API, or the value entered in Dashboard > Game > Gift > UserData itemId
Array
- itemData Array - itemData(JSON) {"item_id" : String, "store_item_id" : String, "count" : Number}
item_id
: unique ID of the item created in Game > Item in the dashboardstore_item_id
: ID of the item to be providedcount
: number of items to be providedResponse
{ "status": 1, "message" : "" }
Property Type Description status
Integer
Result value
0
: failure,1
: successmessage
String
Error message
Request login validation (optional)
You can request login validation to the GAMEPOT server with the information acquired when the member completed login.
Login validation is processed in two steps: Step 1 is GAMEPOT token validation, and Step 2 is social media account validation. If the validation fails in Step 2 during the validation process, then the GAMEPOT blocking feature turns on to block the account.
Do not process the Step 1 GAMEPOT token validation feature synchronously. If you apply synchronous processing for the Step 1 token validation feature, then it is highly likely to interfere with the network communication, therefore causing game play issues for the member. Thus, process the Step 1 token validation feature asynchronously, and implement the application of blocking feature in the subsequent procedure.
- Log in to the dashboard with the admin account.
- Click the Project settings > General menus, in that order, and then enter the ID and key value acquired from each development console in the Auth key area.
- If you do not wish to use the Step 2 validation process and the blocking feature, then skip this procedure.
- Request login validation by referring to the following request, response, and error codes.
Request, response, and error codes
Set login validation request, response, and error codes by referring to the following table and code.
information
POST url : https://gamepot.apigw.ntruss.com/gpapps/v1/loginauth Header : 'content-type: application/json' data: { "projectId": {GamePot SDK's projectId}, "memberId": {GamePot SDK's memberid (user ID)}, "token": {GamePot SDK's Token} "remoteip": {IP information of the logged in account}, "platform": "" }
Property Type Maximum length Description projectId
String
128 GAMEPOT SDK's project ID memberId
String
128 GAMEPOT SDK's user ID token
String
2048 GAMEPOT SDK's token remoteip
String
- IP information of the logged in account (e.g., XXX.XXX.XXX.XXX) platform
String
- Set to pc only when using a PC platform
- Response
{ "status": 1, "message" : "" }
Property Type Description status
Integer
Result value
1
: success
See error codes shown below for failuremessage
String
Error message
- Error codes
Code Description 0
There's missing data in the body
Check ifprojectId
,memberId
,token
were all entered when making the HTTP request-1
Token validation failed
A fake token is used-2
MemberId validation failed
The token’s user ID does not match the user ID in the body-3
Token expired
There's a time difference of more than 60 minutes from the time when the SDK login API was successful and the time when the authentication check was requested
External payment
You can set server to server request for external payment linkage.
Before using this feature, make sure to contact NAVER Cloud Platform for detailed instructions.
Request, response, and error codes
information
POST url : https://gamepot.apigw.ntruss.com/gpapps/v2/thirdparty/purchase Header : 'content-type: application/json' Header : 'x-api-key: xxxxxxxxxxx' data: { "projectId": "e948e5bc-dccd-4729-b9b0-b547ae34b85d", "store": "tpay", "productId": "purchase_001", "transactionId": "t-123412812-sadl-2384-75847", "memberId":"89a907ed-0e1d-42fb-ae4d-75e95581220d", "currency": "KRW", "price":1000, "paymentId": "prepaid", "uniqueId": "" }
header Type Requirement Status Description x-api-key
String
Requirement Status Authentication key issued by GAMEPOT Property Type Maximum length Description projectId
String
128 GAMEPOT SDK's project ID store
String
64 Purchased store productId
String
256 Purchased item ID transactionId
String
512 Unique ID of the payment memberId
String
128 GAMEPOT SDK's user ID currency
String
64 Payment currency price
Number
- Amount of payment paymentId
String
64 Payment method uniqueId
String
512 Unique ID of the in-game payment
- Response
{ "status": 1, "message" : "" }
Property Type Description status
Integer
Result value
1
: success
See error codes shown below for failuremessage
String
Error message
- Error codes
Code Description -1
There's missing data in the body
Check ifprojectId
,transactionId
,productId
,store
,memberId
were all entered when making the HTTP request-2
price
's value is not in thenumber
type-3
projectId
is missing-4
The project does not support the API
Contact GAMEPOT-5
transactionId
already exists-6
DB error.
Contact GAMEPOT