# Read the workbook behind an Excel share link

The workbook a OneDrive or SharePoint share link points at (?link= - onedrive.live.com, 1drv.ms or any *.sharepoint.com address), read through the Microsoft account THIS CALLER connected in Settings. Answers {name, contentType, contentB64}. Any other host is refused with 400 before Microsoft is asked; a link to a document that is not .xlsx, .xlsm, .xlsb, .xls or .csv is 422; a link the caller's account cannot open is 404 saying it has to be shared with them; over 20 MB is 413. Answers 409 when no Microsoft account is connected - the fix is Settings, not a retry. Reach for it when a person pastes an Excel Online link to import.

Access class: `workspace`.

## Endpoint

`GET /v1/onedrive/shared-workbook`

## Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| link | query | string | No |

## Responses

### 200

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "contentB64": "string",
    "contentType": "string",
    "name": "string"
  }
}
```

### default

a refusal: `{"error": "<what a person needs to read>"}`. 401 no credential, 402 the plan does not include this, 403 the seat does not, 404 the thing does not exist or is not yours to see.

Content type: `application/json`.

```json
{
  "error": "string"
}
```
