Layer 220
method Users
contacts.getLocated#d348bc44 flags:# background:flags.1?true geo_point:InputGeoPoint self_expires:flags.0?int = Updates;

Parameters

Name Type Description
Flags # Flags, see TL conditional fields
Background flags.1?true While the geolocation of the current user is public, clients should update it in the background every half-an-hour or so, while setting this flag. Do this only if the new location is more than 1 KM away from the previous one, or if the previous location is unknown.
GeoPoint InputGeoPoint Geolocation
SelfExpires flags.0?int If set, the geolocation of the current user will be public for the specified number of seconds; pass 0 x 7 fffffff to disable expiry, 0 to make the current geolocation private; if the flag isn't set, no changes will be applied.

Returns

Updates

Possible Errors

Code Type Description
406 BUSINESS_ADDRESS_ACTIVE The user is currently advertising a Business Location, the location may only be changed (or removed) using account. update Business Location..
400 GEO_POINT_INVALID Invalid geoposition provided.
406 USERPIC_PRIVACY_REQUIRED You need to disable privacy settings for your profile picture in order to make your geolocation public.
406 USERPIC_UPLOAD_REQUIRED You must have a profile picture to publish your geolocation.

Gogram Example

// ContactsGetLocated - using Params struct
result, err := client.ContactsGetLocated(&tg.ContactsGetLocatedParams{
    GeoPoint: &tg.InputGeoPoint{Lat: 0.0, Long: 0.0},

    // Optional fields:
    // Background: true,
    // SelfExpires: 0,
})
if err != nil {
    // handle error
}
// result is *tg.Updates