Sonetel OAuth API
The Oauth API from Sonetel — 1 operation(s) for oauth.
The Oauth API from Sonetel — 1 operation(s) for oauth.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/sonetel:sonetel-oauth-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
version: '2.0'
title: Authentication OAuth API
summary: Auth API allows the user to generate the JWT token
description: All API requests that deal with private data such as user details, phone number subscriptions and so on require authentication in the form of a bearer token.
termsOfService: https://sonetel.com/en/help/help-topics/terms-conditions/terms-conditions/
contact:
name: Sonetel API Support
email: api.support@sonetel.com
servers:
- url: https://api.sonetel.com/SonetelAuth/beta/
description: Production
security:
- {}
tags:
- name: OAuth
paths:
/oauth/token:
post:
summary: Create token
description: Use this endpoint to generate tokens needed to authenticate API requests.
operationId: create-JWT-token
parameters:
- name: Content-Type
in: header
description: multipart/form-data
required: true
schema:
type: string
default: multipart/form-data
- name: Authorization
in: header
description: Use `sonetel-api` as both username and password
required: true
schema:
type: string
requestBody:
description: 'The `username` & `password` in the request body are the email address & password that are used to login at [app.sonetel.com](https://app.sonetel.com).
In accordance with [OAuth2](https://oauth.net/2/) guidelines, you are also required to specify the `grant_type` in the request body. If requesting for a new token, set it to `password` otherwise set it to `refresh_token` to refresh an expired access token.'
content:
multipart/form-data:
schema:
type: object
properties:
grant_type:
type: string
enum:
- password
- refresh_token
description: The OAuth2 grant type, usually set to 'password' to generate a new token.
default: password
password:
type: string
description: The password you use to login at app.sonetel.com
format: password
refresh:
type: string
enum:
- 'yes'
- 'no'
description: Optional. Flag to control whether or not a refresh token is included in the response.
default: 'yes'
username:
type: string
description: Your email address registered with Sonetel.
format: email
refresh_token:
type: string
description: Optional. Pass the refresh_token in this field to generate a new access_token.
required:
- grant_type
- refresh
examples:
New Token:
value:
grant_type: password
password: pa$$word
refresh: 'yes'
username: user@example.com
Refresh Token:
value:
grant_type: refresh_token
password: pa$$word
refresh: 'yes'
username: user@example.com
refresh_token: refresh_token_from_old_request
responses:
'200':
description: '**OK**
A successful request returns a 200 OK response along with a JSON body that contains the `access_token`, `refresh_token` (if requested) and `token_type`'
content:
application/json:
schema:
type: object
properties:
access_token:
type: string
description: The OAuth2 token that you can use to authenticate API requests.
token_type:
type: string
description: 'Specifies the type of token returned. '
examples:
- bearer
refresh_token:
type: string
description: Contains the refresh token if requested
x-examples:
example-1:
access_token: ACCESS_TOKEN
token_type: bearer
refresh_token: REFRESH_TOKEN
examples:
Example:
value:
access_token: ACCESS_TOKEN
token_type: bearer
refresh_token: REFRESH_TOKEN
'400':
description: '**Bad Request**
This error is returned if the request is incorrect or incomplete.
For example, the `grant_type` field may be missing in the body or the `Content-Type` header may be incorrect.
'
content:
application/json:
schema:
type: object
properties:
error:
type: string
minLength: 1
error_description:
type: string
minLength: 1
required:
- error
- error_description
x-examples:
example-1:
error: invalid_request
error_description: Missing grant type
examples:
Example:
value:
error: invalid_request
error_description: Missing grant type
'401':
description: '**Unauthorized**
Please check that you have included the correct `username` and `password` in the request body.
'
content:
application/json:
schema:
type: object
properties:
error:
type: string
minLength: 1
error_description:
type: string
minLength: 1
required:
- error
- error_description
x-examples:
example-1:
error: unauthorized
error_description: User with name user@example.com not found
examples:
Example:
value:
error: unauthorized
error_description: User with name user@example.com not found
servers:
- url: https://api.sonetel.com/SonetelAuth/beta/
description: Production
tags:
- OAuth