POST /plugins/{pluginId}/entities/{entityId}/exchange-code

Your plugin will receive a code from the parent window through the postMessage API. You can use this code to exchange for an access token for a specific entity.

Body

  • code string Required

    The code to be exchanged for a user token

Responses

  • 200
    Hide response attribute Show response attribute object
    • userToken string
POST /plugins/{pluginId}/entities/{entityId}/exchange-code
curl \
 --request POST 'https://tadatodo.com/api/plugins/{pluginId}/entities/{entityId}/exchange-code' \
 --header "X-Plugin-Secret: $API_KEY" \
 --data '{"code":"12345678901234567890123456789012"}'
Request examples
{
  "code": "12345678901234567890123456789012"
}
Response examples (200)
{
  "userToken": "string"
}