https://cal.com logo
Join Slack
Powered by
# api
  • j

    Jimmy Chan

    06/15/2022, 6:31 AM
    how did you guys deploy api using a submodule on vercel?
  • a

    Agusti

    06/15/2022, 3:16 PM
    Checkout scripts/vercel-deploy.sh
  • a

    Agusti

    06/15/2022, 3:16 PM
    We use with transpile modules in nextjs.config
  • a

    Agusti

    06/15/2022, 8:55 PM
    Was just testing things out in staging, seems to be working, merging new ADMIN endpoints for (event-types, bookings, attendees) to production @Octavian Balatel @Varun Krishnamurthy @Vikram Let me know guys if you need anything else on admin endpoints, will be adding all progressively. Fully deployed now to prod!
    🙏 3
  • v

    Vikram

    06/16/2022, 7:20 PM
    Another weird bug but im getting when making a GET request to the users api
    Copy code
    {
      "message": "'invalid_type' in '0,metadata,proPaidForByTeamId': Expected string, received number"
    }
    z
    a
    • 3
    • 40
  • v

    Vikram

    06/16/2022, 7:21 PM
    pretty sure there was a bad migration with something to do with payments
  • v

    Varun Krishnamurthy

    06/21/2022, 1:05 AM
    @Agusti @zomars Has anything changed with the bookings API? I am trying to create a new booking by doing a POST to
    <https://api.cal.com/v1/bookings?apiKey=>
    with body:
    Copy code
    {
      "eventTypeId": 73558,
      "uid": "23111",
      "startTime": "2022-06-21T17:00:00.000Z",
      "endTime": "2022-06-21T17:45:00.000Z",
      "title": "booking"
    }
    and I am getting a
    400
    with message
    Bad request. Booking body is invalid.
    My request seems to match the documentation at https://documenter.getpostman.com/view/20666831/Uz5ArJni#97dc9de7-fab6-4eb0-843d-472cb0a73524
    p
    a
    • 3
    • 4
  • v

    Vikram

    06/21/2022, 6:40 PM
    @Agusti do you know if the booking api currently adds the event to the users calendar? We are seeing the booked events in the cal.com dashboard but not in our google calendars. I have connected the google calendar app and also configured the event to in the advanced settings to "Create events on" our calendar
    🙏 1
    a
    • 2
    • 17
  • t

    Tarek

    06/21/2022, 8:55 PM
    @Agusti Is there any Api to create users? I see only get, edit and delete Apis
    a
    • 2
    • 23
  • v

    Vikram

    06/24/2022, 2:35 PM
    Can the API be self hosted?
    p
    • 2
    • 1
  • v

    Varun Krishnamurthy

    06/28/2022, 5:49 AM
    Hi @Agusti @zomars @Peer, I noticed the deletion of a booking (DELETE request to
    <https://api.cal.com/v1/bookings/64628?apiKey=><key>
    to delete booking id
    64628
    for example) is no longer working. PATCH to update (reschedule) booking does not work either. I am following the Postman collection . Did anything change with this? This is a crucial use case for us 🙏
    z
    a
    d
    • 4
    • 25
  • d

    Devan Thakur

    06/29/2022, 9:41 AM
    Does the booking API support sending additional params - emails, guests, timezone etc. and sending an email to the attendees
    • 1
    • 2
  • a

    Akshay Aradhya

    06/29/2022, 1:39 PM
    cal.com??
  • p

    Philipp Fruh (Virtual-Identity)

    06/30/2022, 1:49 PM
    Hey, the {{baseUrl}}/v1/memberships api doesnt seem to return all user-to-team memberships... I only seem to get the one with the userId from which ive generated the apikey? Whats the problem here?
    a
    • 2
    • 3
  • e

    Ellery Familia

    07/01/2022, 2:24 AM
    Hi everyone. Just started play with Cal self-hosted. Is the admin panel only available with a paid license? Anywhere to test it out first?
    b
    • 2
    • 3
  • a

    Agusti

    07/01/2022, 8:03 PM
    Hey @Varun Krishnamurthy sorry for the delay. Will make sure to fix it today. Ill DM you once its in prod
    🙏 1
  • l

    lan

    07/05/2022, 10:21 AM
    Hi everyone 1. When I create a schedule through post /v1/schedules, I found that the only allowed fields are id userId name, is this normal? 2. I get an existing event-types through get /v1/event-types/:id, but postman prompts socket hang up after a long time of loading. This is also the case for patch /v1/event-types/:id and delete /v1/event-types/:id. These two issues currently prevent me from continuing to test whether cal can replace my existing service
    t
    • 2
    • 2
  • p

    Philipp Fruh (Virtual-Identity)

    07/11/2022, 12:35 PM
    Hello, I think there is a problem with the user PATCH API, no matter what ID is in the path, it always only patches the user that created the API key...
  • p

    Philipp Fruh (Virtual-Identity)

    07/11/2022, 1:59 PM
    Lots of APIs only work for the api key creators items... this is a problem for us... will this be fixed?
  • z

    zomars

    07/11/2022, 2:15 PM
    The user that generated the API key must have a role of ADMIN in the DB in order to update users other than himself. cc @Agusti who has more context on that
    p
    • 2
    • 1
  • a

    Agusti

    07/11/2022, 3:03 PM
    Hey @Philipp Fruh (Virtual-Identity) as I just said in another thread, we do plan to add support for ADMIN to all API endpoints very soon, stay tuned!
    r
    p
    • 3
    • 11
  • k

    Krishna Raj

    07/19/2022, 3:09 PM
    👋 Need help, attempting to build
    apps/api
    is giving me this errror.
    yarn turbo run build --scope=@calcom/api --include-dependencies --no-deps
    I tried the instructions in the https://github.com/calcom/api/tree/a8e8acd053e0de1da9ad623c3664a837950d6a06 Its possible to fix it by change this line https://github.com/calcom/cal.com/blob/ec07f84d1e9e99cd1a3415b2db9539fadd4973a1/apps/web/ee/pages/api/cron/workflows/scheduleSMSReminders.ts#L8 to include
    @calcom/ee
    , but I want to be sure I am doing it right.
    Copy code
    @calcom/api:build: ../web/ee/lib/workflows/reminders/smsReminderManager.ts:11:25
    @calcom/api:build: Type error: Cannot find module '@ee/lib/workflows/reminders/smsProviders/twilioProvider' or its corresponding type declarations.
    @calcom/api:build: 
    @calcom/api:build:    9 | import dayjs from "@calcom/dayjs";
    @calcom/api:build:   10 | import prisma from "@calcom/prisma";
    @calcom/api:build: > 11 | import * as twilio from "@ee/lib/workflows/reminders/smsProviders/twilioProvider";
    @calcom/api:build:      |                         ^
    @calcom/api:build:   12 | import smsReminderTemplate from "@ee/lib/workflows/reminders/templates/smsReminderTemplate";
    @calcom/api:build:   13 | 
    @calcom/api:build:   14 | export enum timeUnitLowerCase {
    @calcom/api:build: 
    @calcom/api:build: > Build error occurred
    @calcom/api:build: Error: Call retries were exceeded
    @calcom/api:build:     at ChildProcessWorker.initialize (/Users/kraj/tbd_work_area/tbd_git_area/cal_com_sandbox_hosting/cal_com_v3/cal.com/node_modules/next/dist/compiled/jest-worker/index.js:1:11661)
    @calcom/api:build:     at ChildProcessWorker._onExit (/Users/kraj/tbd_work_area/tbd_git_area/cal_com_sandbox_hosting/cal_com_v3/cal.com/node_modules/next/dist/compiled/jest-worker/index.js:1:12599)
    @calcom/api:build:     at ChildProcess.emit (node:events:527:28)
    @calcom/api:build:     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12) {
    @calcom/api:build:   type: 'WorkerError'
    @calcom/api:build: }
    h
    • 2
    • 7
  • p

    Philipp Fruh (Virtual-Identity)

    07/20/2022, 6:55 AM
    Hey hey, is there an updated postman collection for the new api changes?
    z
    r
    a
    • 4
    • 3
  • j

    Jimmy Chan

    07/23/2022, 6:56 PM
    has anyone recently encountered a build error for cal-api
    Type error: Cannot find module '@lib/webhooks/sendPayload' or its corresponding type declarations.
  • k

    Krishna Raj

    07/26/2022, 6:39 AM
    👋 Hello team. I am trying to build api module inside docker and get an error like this. Am i missing a dependency module ?
    Copy code
    Command is: `RUN yarn workspace @calcom/api build
    Copy code
    Step 20/37 : RUN yarn workspace @calcom/api build
     ---> Running in bc5aa4b8127b
    yarn workspace v1.22.19
    yarn run v1.22.19
    $ next build
    warn  - You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: <https://nextjs.org/docs/messages/non-standard-node-env>
    warn - axiom: Envvars not detected. If this is production please see <https://github.com/axiomhq/next-axiom> for help
    warn - axiom: Sending Web Vitals to /dev/null
    warn - axiom: Sending logs to console
    Attention: Next.js now collects completely anonymous telemetry regarding usage.
    This information is used to shape Next.js' roadmap and prioritize features.
    You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
    <https://nextjs.org/telemetry>
    
    info  - Linting and checking validity of types...
    
    Failed to compile.
    
    ./pages/api/attendees/[id].ts
    1:1  Error: Delete `import·type·{·NextApiRequest,·NextApiResponse·}·from·"next";⏎⏎`  prettier/prettier
    5:9  Error: Replace `·schemaAttendeeEditBodyParams,·schemaAttendeeReadPublic·` with `⏎··schemaAttendeeEditBodyParams,⏎··schemaAttendeeReadPublic,⏎`  prettier/prettier
    9:56  Error: Insert `t";⏎import·type·{·NextApiRequest,·NextApiResponse·}·from·"nex`  prettier/prettier
    120:14  Error: Replace `.status(400)` with `⏎············.status(400)⏎············`  prettier/prettier
    180:56  Error: Replace `withValidQueryIdTransformParseInt(attendeeById)` with `⏎··withValidQueryIdTransformParseInt(attendeeById)⏎`  prettier/prettier
    
    ./pages/api/attendees/index.ts
    1:1  Error: Delete `import·type·{·NextApiRequest,·NextApiResponse·}·from·"next";⏎⏎`  prettier/prettier
    5:9  Error: Replace `·schemaAttendeeCreateBodyParams,·schemaAttendeeReadPublic·}·from·"@lib/validations/attendee` with `⏎··schemaAttendeeCreateBodyParams,⏎··schemaAttendeeReadPublic,⏎}·from·"@lib/validations/attendee";⏎import·type·{·NextApiRequest,·NextApiResponse·}·from·"next`  prettier/prettier
    24:39  Error: Replace `·schemaAttendeeReadPublic.parse(attendee)` with `⏎······schemaAttendeeReadPublic.parse(attendee)⏎····`  prettier/prettier
    89:10  Error: Replace `.status(400)` with `⏎········.status(400)⏎········`  prettier/prettier
    101:55  Error: Replace `.map((booking:·{·id:·number·})·=>·booking.id)` with `⏎········.map((booking:·{·id:·number·})·=>·booking.id)⏎········`  prettier/prettier
    
    ./pages/api/availabilities/[id].ts
    1:1  Error: Delete `import·type·{·NextApiRequest,·NextApiResponse·}·from·"next";⏎⏎`  prettier/prettier
    13:1  Error: Insert `import·type·{·NextApiRequest,·NextApiResponse·}·from·"next";⏎`  prettier/prettier
    20:8  Error: Replace `.status(400)` with `⏎······.status(400)⏎······`  prettier/prettier
    25:53  Error: Insert `⏎···`  prettier/prettier
    57:16  Error: Replace `.status(404).json({·mess
    a
    • 2
    • 10
  • p

    Patrick DePippo

    07/26/2022, 11:17 AM
    I'm also having similar dependency problems, is master currently broken?
  • a

    Agusti

    07/26/2022, 6:56 PM
    I will check that out and get back to you guys, those seem linting errors I don’t know why they where sneaked in, we recently enabled eslint for the API so that might be why, will fix those if that’s the case.
    k
    • 2
    • 1
  • k

    Kaushal Sharma

    07/27/2022, 2:32 PM
    I want my app users to programmatically create booking and event types using APIs. Is there a global key that I can use to create bookings and event types for them?
    k
    • 2
    • 6
  • w

    Will Gittoes

    07/28/2022, 5:18 AM
    Howdy folks, I’ve got an issue with
    viewer.setDestinationCalendar
    . It never works. I’ve removed ALL calendar apps and re-added just my Apple Calendar. I have two calendars, and by default it wants to post to the family calendar and that works, but I want to switch it to my personal calendar. I get this response:
    Copy code
    [
        {
            "id": null,
            "error": {
                "json": {
                    "message": "Could not find calendar <https://caldav.icloud.com/14--snip---55/calendars/DDE---snip---D7/>",
                    "code": -32600,
                    "data": {
                        "code": "BAD_REQUEST",
                        "httpStatus": 400,
                        "path": "viewer.setDestinationCalendar"
                    }
                }
            }
        }
    ]
    Hmmmm don’t worry, updating to latest production branch seemed to fix it!
    • 1
    • 1
  • k

    Krishna Raj

    08/10/2022, 1:55 AM
    👋 API module is still failing to build. Any idea when it will get fixed ? @Peer
    • 1
    • 1
12345Latest