Get OAuth Connection
Get the oauth connection for a user
Authorization
Authorization
RequiredBearer <token>The Recal API token
In: header
Path Parameters
provider
RequiredstringCalendar provider (google or microsoft)
Pattern:
"^(google|microsoft)$"
userId
RequiredstringQuery Parameters
redacted
booleanRedact the oauth connection
Default:
true
Response Body
TypeScript Definitions
Use the response body type in TypeScript.
provider
RequiredstringCalendar provider (google or microsoft)
Pattern:
"^(google|microsoft)$"
accessToken
unknownrefreshToken
nullemail
Requiredstring | null | nullexpiresAt
RequiredDate | null | nullscope
Requiredarray<string>alive
RequiredbooleanTypeScript Definitions
Use the response body type in TypeScript.
response
Requiredstringcurl -X GET "https://api.recal.dev/v1/users/string/oauth/string?redacted=true" \
-H "Authorization: Bearer <token>"
fetch("https://api.recal.dev/v1/users/string/oauth/string?redacted=true", {
headers: {
"Authorization": "Bearer <token>"
}
})
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.recal.dev/v1/users/string/oauth/string?redacted=true"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/string/oauth/string?redacted=true"
response = requests.request("GET", url, headers = {
"Authorization": "Bearer <token>"
})
print(response.text)
{
"provider": "google",
"accessToken": null,
"refreshToken": {},
"email": "user@example.com",
"expiresAt": {},
"scope": [
"string"
],
"alive": true
}
"User not found"