> For the complete documentation index, see [llms.txt](https://wpcloudplugins.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wpcloudplugins.gitbook.io/docs/developers/api/set_drive_by_id.md). Agents can also search and read this documentation through its [MCP server](https://wpcloudplugins.gitbook.io/docs/~gitbook/mcp).

# set\_drive\_by\_id()

## Set Drive for API calls

&#x20; <mark style="background-color:orange;">set\_drive\_by\_id()</mark> &#x20;

This method will set which Drive will be used for other API calls.

### **Parameters**

| Name        | Type   | Description |
| ----------- | ------ | ----------- |
| `$drive_id` | string | Drive ID    |

### **Usage**

{% tabs %}
{% tab title="OneDrive" %}

```php
$account = WPCP_ONEDRIVE_API::set_account_by_id('8c9bacda0-d8d8-4b22-b634-7b5281687575');

WPCP_ONEDRIVE_API::set_drive_by_id('b!DlaHWskCed_MIid3KpJH5Lbatf9HsdXBAZH5YcvPAbMhJUKzTJyzgvXZYpBS');
```

{% endtab %}

{% tab title="Google Drive" %}
{% hint style="info" %}
**Not supported.**
{% endhint %}
{% endtab %}

{% tab title="Dropbox" %}
{% hint style="info" %}
**Not supported.**
{% endhint %}
{% endtab %}

{% tab title="Box" %}
{% hint style="info" %}
**Not supported.**
{% endhint %}
{% endtab %}
{% endtabs %}
