Server to server settings

Prev Next

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.

  1. Log in to the dashboard with the admin account.
  2. Click the Project settings > General menus, in that order.
  3. 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.
  4. 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 payment
    etc String - etc (etc entered when calling purchase API)


  • Response
    {
        "status": 1,
        "message" : ""
    }
    
    Property Type Description
    status Integer Result value
    0: failure, 1: success
    message 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 dashboard
    store_item_id: ID of the item to be provided
    count: number of items to be provided
  • Response

    {
        "status": 1,
        "message" : ""
    }
    
    Property Type Description
    status Integer Result value
    0: failure, 1: success
    message 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.

Caution

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.

  1. Log in to the dashboard with the admin account.
  2. 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.
  3. 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 failure
    message String Error message


  • Error codes
    Code Description
    0 There's missing data in the body
    Check if projectId, memberId, tokenwere 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 failure
    message String Error message


  • Error codes
    Code Description
    -1 There's missing data in the body
    Check if projectId, transactionId, productId, store, memberIdwere all entered when making the HTTP request
    -2 price's value is not in the numbertype
    -3 projectId is missing
    -4 The project does not support the API
    Contact GAMEPOT
    -5 transactionId already exists
    -6 DB error.
    Contact GAMEPOT