oauth

OAuth authorize URL (browser redirect, not an API request)

This is not a REST endpoint. Redirect the user's browser to this URL — do not call it as a server-to-server API request.

Step 1: Requesting authorization

First, redirect the customer's web browser to the authorize endpoint. Formify will send the customer to the Formify app to authorize your app to access their Formify account.

Authorize URL:

GET https://docs-api.formify.eu/v1/oauth/authorize?client_id={client_id}&redirect_uri={redirect_uri}&response_type=code&scope=read%20write&state={state}

Parameters:

ParameterRequiredDescription
client_idYesThe client ID provided to you by Formify when you register your app.
redirect_uriYesThe callback URL you provided when you registered your app. This should be URL-encoded.
response_typeYesMust be code.
scopeYesRequested access scope. One of read, write, or read write (space-separated).
stateRecommendedStrongly recommended for CSRF protection. Send a random value and verify that the same value is returned to your callback.

Example of URL-encoded redirect_uri: https%3A%2F%2Fwww.your-domain.com%2Foauth%2Fcallback

Step 2: Customer Authorizes the App

The customer will see a confirmation dialog. If they authorize, they will be redirected to the callback URL with a code parameter:

GET https://your-callback-url.com?code={authorization_code}&state={state}

Step 3: Exchange Authorization Code for Access Token

Make a POST request to /oauth/token through the API to exchange the authorization code for an access token and refresh token. The refresh token is normally valid for 60 days.

Request:

POST https://docs-api.formify.eu/v1/oauth/token
Content-Type: application/x-www-form-urlencoded

grant_type=authorization_code&code={authorization_code}&client_id={client_id}&client_secret={client_secret}&redirect_uri={redirect_uri}

Response:

{
  "access_token": "{access_token}",
  "expires_in": 3600,
  "refresh_token": "{refresh_token}",
  "token_type": "Bearer",
  "scope": "read write"
}
get/oauth

Request

  • Base URL: https://app.formify.eu
  • URL: https://app.formify.eu/oauth
  • Auth: none required

Query parameters

client_idstring required

The client ID for your application. Find it in the Formify app under Settings → Integration → My applications → Details.

statestring

Strongly recommended for CSRF protection. Send a random value and verify that the same value is returned to your callback.

redirect_uristring required

The callback (redirect) URL registered for your app. Manage your callback URLs in the Formify app under Settings → Integration → My applications → Details.

response_type'code' required

Must be code.

scope'read' | 'write' | 'read write' required

Requested access scope. Use read write (space-separated) for full access.

errorLanguage'en' | 'sv' | 'es'

Language for the error message

Changes

No recorded changes to this operation across all 1 revision of this API.