> ## Documentation Index
> Fetch the complete documentation index at: https://docs.oneshotagent.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Profile Views and Reactions

> View a profile or react to a post through a connected account that granted view_profile / react.

Two paid, idempotent engagement actions: view a profile, or react to a post. Both share the contract of [Reply](/api-reference/linkedin/reply): fixed price per action, `Idempotency-Key` required, synchronous rejections before payment, per-account daily caps with randomized spacing (paced separately from replies), and the worker's grant check at execution time.

**Settlement.** A `202` means the action was accepted and charged, and the worker then runs it. If the job fails **before** anything reaches LinkedIn (grant changed, account disconnected at execution, cap re-check), the failed-job sweep refunds the receipt as agent credit. An action that reached `sending` or completed stays charged.

<Snippet file="audit-context-params.mdx" />

## Profile view

`POST /v1/tools/linkedin/profile-view`. Requires the `view_profile` grant.

<ParamField body="account_id" type="string" required>Connected LinkedIn account id.</ParamField>
<ParamField body="identifier" type="string" required>The target's public identifier (`jane-doe`), provider id, or a `linkedin.com/in/<slug>` URL (normalized to the slug).</ParamField>
<ParamField body="notify" type="boolean" default="false">`false` is a data read. `true` shows the human in the target's "who viewed your profile", a visible signal that **cannot be undone**.</ParamField>

Result (job `completed`):

```json theme={null}
{
  "action_request_id": "…", "action": "view_profile", "status": "sent",
  "profile": {
    "provider_id": "…", "public_identifier": "jane-doe", "name": "Jane Doe",
    "headline": "CTO at …", "location": "Austin, Texas", "network_distance": "DISTANCE_2", "is_open_profile": null
  }
}
```

The summary contains only public-safe fields: no contact info, no pictures. Views count toward LinkedIn's guidance of roughly 100 profile retrievals per account per day, whether or not they notify. OneShot's default cap is 100/day (`LINKEDIN_DAILY_PROFILE_VIEW_CAP`).

## Reaction

`POST /v1/tools/linkedin/react`. Requires the `react` grant.

<ParamField body="account_id" type="string" required>Connected LinkedIn account id.</ParamField>
<ParamField body="post_id" type="string" required>The post's LinkedIn social id, e.g. `urn:li:activity:7100000000000000000` or `urn:li:ugcPost:…`.</ParamField>
<ParamField body="reaction_type" type="string" default="like">`like` · `celebrate` · `support` · `love` · `insightful` · `funny`.</ParamField>

Default cap 50/day (`LINKEDIN_DAILY_REACTION_CAP`). "Already reacted" is treated as success. The human can remove reactions on LinkedIn, but this API cannot.

## Failure semantics (different from reply on purpose)

Engagement retries; reply does not. Viewing a profile twice or re-sending the same reaction is idempotent upstream, so a timeout or 5xx is **retried immediately** (at most two attempts), then fails with `provider_unavailable`. There is no `ambiguous` state and no reconciliation. Other codes: `grant_revoked`, `account_disconnected`, `target_not_found`, `content_rejected`, `rate_limited`, `account_send_limit`.

## Response and errors

Same 202 shape as [Reply](/api-reference/linkedin/reply#response) (with `action` set to `view_profile` / `react` and no `conversation_id`), and the same pre-payment error table minus the conversation-specific codes.

## Examples

```typescript theme={null}
const view = await agent.linkedinViewProfile({ accountId, identifier: 'https://www.linkedin.com/in/jane-doe/', notify: true, memo: 'warm-up before outreach' });
console.log(view.profile.headline);
await agent.linkedinReact({ accountId, postId: 'urn:li:activity:7100000000000000000', reactionType: 'insightful', memo: 'engage with prospect post' });
```

```python theme={null}
client.linkedin_view_profile(account_id, "jane-doe", notify=True)
client.linkedin_react(account_id, "urn:li:activity:7100000000000000000", reaction_type="celebrate")
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.