Developers
qashio.com

Qashio OAuth 2.0 integration guide

Connect your product to Qashio. Your users sign in with their Qashio account, approve access, and your app receives tokens to call Qashio APIs. Two flows, one tab apart: the standard one when you host a callback URL, Qashio's in-app one when you do not.

Watch the flow

Creating an OAuth application in Qashio and collecting the credentials this walkthrough needs, recorded on UAT.

0:00
0:00
Recorded on UAT. Client ID and Client Secret are shown once at creation, so store them before closing the dialog.

When to use this flow

Use the standard OAuth 2.0 flow when your product has a web address Qashio can redirect to. Qashio sends the user back to your redirect_uri with the authorization code in the query string, and your server takes it from there.

If you have no callback URL to offer: an internal script, an ERP job, a Postman collection: switch to the Qashio in-app OAuth flow tab above. Qashio hosts the callback for you there, and hands the code back inside the dashboard. Everything from the token exchange onwards is the same in both.

What you need

  • A Qashio company admin account.
  • Your app's callback URL (HTTPS in production).
  • A Qashio OAuth client app, which gives you the Client ID and Client Secret.

Part 1: Register your application in Qashio

1. Sign in to the Qashio dashboard

Open Qashio and choose Sign in with Email, enter your email and password, and enter the SMS code if you are asked for one.

2. Open Qashio API settings

Click your avatar, then Company Settings → Qashio API.

Company Settings, Qashio API tab, listing the OAuth apps registered for the company

3. Add an OAuth app

Click Add OAuth App and fill in the form.

The New application drawer, with Name, Authorized origins and Redirect URLs filled in

FieldWhat to enter
NameA label your team will recognise, for example Qashio App
Authorized originsYour app's origin, for example https://maidcc.com
Redirect URLsThe exact callback URL, for example https://maidcc.com/callback

The redirect URL must match character for character what your app sends later.

Click Create application.

4. Copy the Client ID and Client secret

The created app showing the one-time client secret, the Client ID, and the client secrets list

The client secret is shown once. Copy it immediately and store it on your server.

CredentialFormatWhere it is used
Client IDStarts with qc_Authorize URL and token requests
Client secretLong random stringToken requests only, server-side

Part 2: Send the user to Qashio

From your app, redirect the browser to the authorize URL.

HTTP
https://app.qashio.com/oauth/authorize
  ?client_id=qc_YOUR_CLIENT_ID
  &redirect_uri=https://maidcc.com/callback
  &response_type=code
  &state=a3e71e656e014153
FieldRequiredExample
client_idyesqc_…
redirect_uriyeshttps://maidcc.com/callback (must match the registered URL)
response_typeyescode
stateyesA random string you generate per attempt, for CSRF protection

Store state in the user's session before the redirect. You will check it on the way back.

Part 3: The user signs in and allows access

Qashio opens its sign-in page, subtitled "Please sign in to your account to authorize access". The user chooses Sign in with Email, enters their credentials, and confirms with SMS if asked.

The Qashio sign-in page shown during the authorize step

The consent screen listing app permissions, with the terms checkbox and the Allow button

Qashio then shows the consent screen: the app name, the company the app is bound to, the permissions it can use, and a Terms of Service checkbox. The user reviews it, ticks the terms, and clicks Allow.

Cancel stops the flow. Qashio will not send a code to your app.

Part 4: Handle the callback and get tokens

Qashio redirects the browser back to your registered URL:

HTTP
https://maidcc.com/callback?code=…&state=…

On your server, in order:

  1. Read code and state from the query string.
  2. Confirm state matches the value you stored in Part 2. If it does not, abort.
  3. Exchange the code for tokens.

The code is one-time use and short-lived. Exchange it immediately. Access tokens usually last about 15 minutes, refresh tokens about 30 days.

Exchange the code

HTTP
POST https://api.qashio.com/oauth2/token
Content-Type: application/json
FieldValue
grant_typeauthorization_code
codeThe code from the callback
redirect_uriThe same URL you sent on authorize
client_idYour Client ID
client_secretYour Client secret
JSON
{
  "grant_type": "authorization_code",
  "code": "PASTE_CODE_HERE",
  "redirect_uri": "https://maidcc.com/callback",
  "client_id": "qc_YOUR_CLIENT_ID",
  "client_secret": "YOUR_CLIENT_SECRET"
}

The response carries:

FieldMeaning
access_tokenA JWT. Send it as Authorization: Bearer … on API calls
token_typeBearer
refresh_tokenLong-lived token used to mint a new access token

Common mistakes

SymptomCauseFix
Authorization issueWrong or inactive Client IDCopy the Client ID from Qashio API settings
Authorization issueredirect_uri not registeredRegister the exact callback URL, then send that same value
Token exchange failsredirect_uri on the token request differs from authorizeSend the identical value both times
Token exchange failsCode reused or too oldExchange immediately; codes are one-time
401 on APIsAccess token expired, about 15 minutesCall refresh, then retry
Refresh returns an errorMissing client_id or client_secretSend both with every refresh
Refresh fails after a successful refreshOld refresh token reusedStore and use the new refresh token
Unknown Client IDClient ID copied incorrectly, or the app is not activeRe-copy the value from Qashio API settings and verify the app exists
Qashio stays on the same page during authorizeRedirect URL not registeredAdd the exact redirect URL in the app configuration

Unknown Client ID

Qashio error page: the client ID for this application is unknown or inactive

Redirect URL not registered. Qashio stays on this page: it never sends the user to an unregistered URL.

Qashio error page: the redirect URL for this application is not registered

Security checklist

  • Generate a new state on every authorize attempt.
  • Keep the client secret on the server only.
  • Exchange the code on the server, not in the browser.
  • Treat refresh tokens like passwords.
  • Use HTTPS for every redirect URL in production.

You now have the full Qashio OAuth 2.0 flow: register the app, redirect for authorization, exchange the code, call the APIs, and refresh tokens before they expire.

Esc

Start here

IntroductionIntegration walkthroughAuthenticationConventions

Popular endpoints

POSTExchange code for tokens/oauth2/tokenGETGet company summary/public/v1/erp/company/summaryGETList bank accounts/public/v1/erp/bank_accountsGETList cards/public/v1/erp/cardsGETList chart of accounts/public/v1/erp/chart_of_accounts