Developer
Links

Reading Open Graph properties

Reading Open Graph properties with the ShortFreeURL REST API: GET /api/links/opengraph/42/918. Read saved Open Graph, Twitter and app-link metadata for this…

Complete this task in your own workspace. The screenshots use demonstration data.

1. Prepare your workspace and API key

Open Dashboard → Integrations & API → API. Create a named secret key with the smallest required scope. Use a read-only key for reporting. Store it as SHORTFREEURL_API_KEY in your environment. The secret is shown once.

ShortFreeURL API keys in a demonstration workspace
Select the scope before creating your key. Never share the secret in a screenshot. · Demo workspace. Click to enlarge.

2. Find the correct resource

Open Branded Links. Select your domain. A link editor URL contains id=; use that link ID in requests. Get domain IDs from GET /api/domains. Replace example IDs 42 and 918 and the example hostname with your own values.

ShortFreeURL Branded Links in a demonstration workspace
Branded Links · Demo workspace. Click to enlarge.

3. Review the operation

Read saved Open Graph, Twitter and app-link metadata for this link. The domain ID must match the link.

GET /api/links/opengraph/42/918. This reads data. Inspect upgradeRequired in responses: a successful update can leave unsupported fields unchanged.

4. Choose a language and run the request

Terminal setup with PowerShell, Bash and screenshots →

Shell uses curl. Node requires a runtime with fetch. Python uses its standard library. Other examples list their required HTTP library in code. Set the API host to this installation’s deployed HTTPS origin, then run the example from your terminal or backend.

curl --request GET 'https://api.shortfreeurl.com/api/links/opengraph/42/918' \
  --header "Authorization: Bearer $SHORTFREEURL_API_KEY"

5. Verify the result

  1. Read the HTTP status and response. For QR exports, save the returned image instead of parsing JSON.
  2. Check the returned IDs, filters and pagination. Empty analytics on a new link is valid.
  3. For targeting, expiry or password changes, make a controlled test visit. A real visit may add to analytics. For deletion, verify the record is absent before retrying.

6. Troubleshoot safely

  • 401: check key expiry, revocation and workspace membership.
  • 403/402: check role, key scope, feature access and subscription.
  • 404: confirm the resource belongs to your workspace and domain.
  • 429: wait for Retry-After, reduce concurrency and check plan limits.
  • Timeout after a write: read the resource first; avoid creating duplicates.

Try a request in the API reference · All workflow guides