# Facing error while creating a virtual account

**URL:** <https://forums.nylas.com/t/facing-error-while-creating-a-virtual-account/132>\
**Category:** Question and Answers\
**Tags:** calendar-api\
**Created:** [March 13, 2024, 4:38pm UTC](https://forums.nylas.com/t/facing-error-while-creating-a-virtual-account/132 "2024-03-13T16:38:47Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![ram](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.nylas.com/ram/32/3_2.png) [@ram](https://forums.nylas.com/u/ram)\
**Post date:** [March 14, 2024, 8:17pm UTC](https://forums.nylas.com/t/facing-error-while-creating-a-virtual-account/132/6 "2024-03-14T20:17:50Z")

</div>

@krutd33 Just breaking down the steps so we can ensure everything is working, I’m going to try this in our postman collection as well:

**Step 1)** We need to create a Connector (so we need a [connector setup very similar to a Google or Microsoft](https://developer.nylas.com/docs/v3/auth/#create-a-connector)), so that’s the first call to:  
`https://api.us.nylas.com/v3/connectors`

This will let us create virtual calendars. We are still at this step based on your message.

**Step 2)** Next we need to create an actual user account, so a virtual user account, so the call will be do:  
`https://api.us.nylas.com/v3/connect/custom`

**Step 3)** By creating a virtual user account, we should receive a `grant_id` that we can use to create virtual calendars, using this call:  
`https://api.us.nylas.com/v3/grants/:grant_id/calendars`

* * *

So let’s go back to Step 1, let me try this out via [postman](https://www.postman.com/trynylas/workspace/nylas-api/request/21157315-dff0ae44-bfb6-44c4-85ce-a7444c092aab), and I was able to create one using the following cURL command shared by postman:

```auto
curl --location 'https://api.us.nylas.com/v3/connectors' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <NYLAS_API_KEY>' \
--data '{
  "provider": "virtual-calendar",
  "name": "nylas"
}'

```

The response was as follows:

```auto
{
    "request_id": "<REQUEST_ID>",
    "data": {
        "provider": "virtual-calendar"
    }
}

```

So one question for Step 1, for `Authorization` are you removing the keyword `Bearer`? We need to include `Bearer` so the `Authorization` should include: `Bearer` and the `<NYLAS_API_KEY>` (so the value `nyk...` taken from the `API Keys` on the [v3 dashboard](https://dashboard-v3.nylas.com/applications))

Another useful call I like to try to test things are working before re-trying creating a virtual connector is just grabbing the application details:

```auto
curl --location 'https://api.us.nylas.com/v3/applications' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <NYLAS_API_KEY>'

```

---

_[View the full topic](https://forums.nylas.com/t/facing-error-while-creating-a-virtual-account/132)._
