LogoRecal

Check OAuth Connection Status

Validate the oauth code

POST
/v1/users/oauth/{provider}/verify

Authorization

AuthorizationRequiredBearer <token>

The Recal API token

In: header

Request Body

application/jsonRequired
codeRequiredstring
scopeRequiredarray<string>
stateRequiredstring

Path Parameters

providerRequiredstring

Calendar provider (google or microsoft)

Pattern: "^(google|microsoft)$"

Query Parameters

redirectUrlstring

Response Body

TypeScript Definitions

Use the response body type in TypeScript.

successRequiredboolean

TypeScript Definitions

Use the response body type in TypeScript.

responseRequiredstring

TypeScript Definitions

Use the response body type in TypeScript.

responseRequiredstring
curl -X POST "https://api.recal.dev/v1/users/oauth/string/verify?redirectUrl=string" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "code": "string",
    "scope": [
      "string"
    ],
    "state": "string"
  }'
const body = JSON.stringify({
  "code": "string",
  "scope": [
    "string"
  ],
  "state": "string"
})

fetch("https://api.recal.dev/v1/users/oauth/string/verify?redirectUrl=string", {
  headers: {
    "Authorization": "Bearer <token>"
  },
  body
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
  "strings"
)

func main() {
  url := "https://api.recal.dev/v1/users/oauth/string/verify?redirectUrl=string"
  body := strings.NewReader(`{
    "code": "string",
    "scope": [
      "string"
    ],
    "state": "string"
  }`)
  req, _ := http.NewRequest("POST", url, body)
  req.Header.Add("Authorization", "Bearer <token>")
  req.Header.Add("Content-Type", "application/json")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://api.recal.dev/v1/users/oauth/string/verify?redirectUrl=string"
body = {
  "code": "string",
  "scope": [
    "string"
  ],
  "state": "string"
}
response = requests.request("POST", url, json = body, headers = {
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
})

print(response.text)
{
  "success": true
}
"Invalid code"
"OAuth authorization provider not found"