Get user

This API route will let you get a user by its id.

GET

Authentication

Authentication is required by using your Api Key in the Authorization header.

Authorization: ApiKey [SERVER_API_KEY]
note

You should only use this API call from your server.
For security reasons, each API endpoint has a rate limit of 5 requests per second.

Url parameters

appId
StringApp id
userId
StringUser id

Query parameters

environment(Optional)Values
StringApp environment (production by default)
platformValues
StringUser platform

Response properties

tags
ObjectUser tags
productsForSale
ArrayUser's products available for sale
Array element
id
StringProduct id
type
StringProduct type
sku
StringProduct sku
Only if the product has a group
group
StringGroup id
groupName
StringGroup name
Only for a subscription
subscriptionPeriodTypeValues
StringSubscription period type, use this property to detect if there is an introductory price or free trial available
activeProducts
ArrayUser active subscriptions or non-consumables
Array element
id
StringProduct id
type
StringProduct type
sku
StringProduct sku
platformValues
StringPlatform of the purchase
purchase
StringPurchase id
purchaseDate
StringDate of the purchase
isFamilyShare
BooleanTrue if it is shared by a family member (iOS only)
Only if the product has a group
group
StringGroup id
groupName
StringGroup name
Only for a subscription
expirationDate
StringDate of the subscription expiration
autoResumeDate
StringThe subscription renewal has been paused, date the subscription will be automatically resumed (Android only)
androidToken
StringAndroid purchase token
isSubscriptionRenewable
BooleanTrue if the subscription is renewable
isSubscriptionRetryPeriod
BooleanTrue if the subscription is currently trying to be renewed
subscriptionStateValues
StringCurrent state of the subscription
subscriptionPeriodTypeValues
StringCurrent period type of the subscription

Example

Url

https://api.iaphub.com/v1/app/acc317e366ce2d1f18fcb743/user/5cc317e366ce2d1f18fcb743?platform=ios&environment=staging

Response

{
productsForSale: [
{
id: '5cc317e366ce2d1f18fcb7d5',
type: 'consumable',
sku: 'pack30_tier20'
},
{
id: '5cc3186a807ee31f30d7598b',
type: 'consumable',
sku: 'pack60_tier30'
},
{
id: '5c967b2a550898361bffbebe',
type: 'renewable_subscription',
sku: 'subscription1_tier5',
subscriptionPeriodType: 'normal',
group: '1cc3186a807ee31f30d75982',
groupName: 'premium'
}
],
activeProducts: [
{
id: '5c967b2a550898361bffber3',
type: 'renewable_subscription',
sku: 'subscription2_tier10',
purchase: 'c967b2a550898361bffber1',
purchaseDate: '2020-05-21T18:59:18.548Z',
expirationDate: '2021-06-20T18:59:31.763Z',
isSubscriptionRenewable: true,
isSubscriptionRetryPeriod: false,
subscriptionPeriodType: 'intro',
groupName: 'premium',
},
{
id: '5c967b2a550898361bffber3',
type: 'non_consumable',
sku: 'vipmode_tier50',
purchaseDate: "2019-04-16T11:24:17.716Z"
}
]
}