• About Us
  • Blog
  • Basket
  • Account
  • Sign In


PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 10 Jan 2017 10:26 AM by  Ben Shillito
Detect device by HardwareModel
 1 Replies
You are not authorized to post a reply.
Author Messages

Je Stu

New Member

New Member

09 Jan 2017 10:43 AM
    Is there anyway to get device values based on the HardwareModel instead of the user agent using the Cloud service?
    Eg. I have HardwareModel = IPHONE9,2 and want to get the values HardwareName (iPhone 7 Plus) & HardwareVendor (Apple).

    For the UA I use:
    https://cloud.51degrees.com/api/v1/">https://cloud.51degrees.com/api/v1/{key}//match?user-agent={ua}&Values=['HardwareName', 'HardwareVendor']

    I would think to get a response based on model it would be this:

    But that seems to give a response which is not very useful...

    Ben Shillito

    New Member

    New Member

    10 Jan 2017 10:26 AM
    The find profiles functionality is not currently available in our cloud service. The way you would do this with our on premise API would be something like

    var profiles = provider.findProfiles("HardwareModel", modelToSearchFor);
    foreach (var profile in profiles)
    var match = provider.getMatchForDeviceId(profile.deviceId);
    // do something with the match object here.

    depending on the language used.

    The cloud API does do matching for device IDs. For example, the iPhone 7 Plus has multiple models, so the code above gives the profile ID 68512 for the model A1661 which can be used in the cloud service like


    to return all the values for the iPhone 7 Plus device (the values will likely be the same for other 7 Plus model numbers as they are usually just different regions/carriers).

    The searching part cannot be done via the cloud API currently, so my suggestion would be to try the on premise API. If for some reason you cannot switch from the cloud API, we are going to be working on the cloud API in the near future so I can keep you updated on what will be included.
    You are not authorized to post a reply.