Adds a link to the "Links" block in a group's profile.

The current user must be an administrator in the group.

This method requires the following permissions: groups.

Parameters

group_id
integer (positive)

Group identifier.

link
string

The link URL.

text
string

Link description.

If this link points to an object that can be displayed within Smithereen (e.g. a user, a group, a post, etc), this is displayed as the description. Otherwise, it's displayed as the link title and the domain of the URL is used as the description.

If this parameter is not specified, it will be assigned automatically.

Result

Returns an object of the same format as the links field in the group object:

id
integer

Identifier of this link.

url
string

The URL of this link.

name
string

The title of this link.

description
string

The description of this link.

photo_50
string

50x50 preview image URL.

photo_100
string

100x100 preview image URL.

photo_200
string

200x200 preview image URL.

object_type
enum

If this link points to an object, the type of that object.

Possible values: user, group, post, photo, photo_album, topic.

object_id
string

If this link points to an object, the identifier of that object.

Errors

401
Failed to fetch remote object due to a network error
402
Remote object is of an unsupported type
403
Request to the remote server timed out
404
Remote object not found
405
Failed to fetch remote object due to other error
Global errors may also occur when calling this method.