Get shortcode by id
Get media shortcode by media id. This endpoint is provided free of charge.
Params
Name | Type | Default | Description |
---|---|---|---|
id (required) | string | – | Media id |
Usage
- Python
- PHP
- cURL
from rocketapi import InstagramAPI
instagram_api = InstagramAPI(token="your-api-key")
print(instagram_api.get_media_shortcode_by_id(2967835229909923253))
<?php
require('vendor/autoload.php');
use RocketAPI\InstagramAPI;
$api = new InstagramAPI('your-api-key');
print_r($api->getMediaShortcodeById(2967835229909923253));
curl --request POST \
--url https://v1.rocketapi.io/instagram/media/get_shortcode_by_id \
--header 'Content-Type: application/json' \
--header 'Authorization: Token your-api-key' \
--data '{
"id": 2967835229909923253
}'
Response example
Loading...