Device42 API Token Authentication API
The API Token Authentication API from Device42 — 2 operation(s) for api token authentication.
The API Token Authentication API from Device42 — 2 operation(s) for api token authentication.
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/device42:device42-api-token-authentication-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:
title: Device42 API Token Authentication API
version: '2.0'
description: 'API Overview
RESTful APIs are supported in Device42 as one of the primary methods of entering, editing and retrieving data.'
contact:
name: Device42
email: support@device42.com
servers:
- url: https://<host>
security:
- basicAuth: []
- bearerAuth: []
tags:
- name: API Token Authentication
paths:
/tauth/1.0/token/:
post:
operationId: postapitoken
summary: Request an API Token
description: Used to request a token from an API Client. Once a token has been obtained, the token can be used as the Bearer token on subsequent API calls The Client key and Client secret key of an API Client are provided as Basic authentication userid and password.
tags:
- API Token Authentication
responses:
'200':
description: 'The above command returns results like this:'
content:
application/json:
schema:
properties:
code:
example: '0'
expires:
example: '2022-02-03T19:23:03.267Z'
token:
example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJEZXZpY2U0MiIsInRva2VuX2lkIjozOSwiY2xpZW50X2lkIjo2LCJleHAiOjE2NDM5MTYxODMsImV4aSI6NjAwfQ.CYZvhvXtKTpOJRpeQudAzFlqjdZc5tTx3oS9XOwXk_N2P9WCmQlsiXSFSVVUsU3XGRprLEULrBKlcpuo08c4mZxiNGV99X40HFWlGrWWjB0scW3CwHX0c2Y6xHbUhH70Fhw5J2ivMsuwb5ecUuQnVqLzXPAriirwjn90ikCEF56_1MPWN9Qgy6r_ZjSre2JpCFgkPZ0PKAMkq-lTH1FNLwcTGG9dB8BwWW7okEQdvU_RJsjJZCOj-i5AdPcWrHMAqpJKE1FqKTSOCD3YbMIbsLA0rhCUFzqaIgUKm8kcknCTjcpPrpzKk6toqA82UuToW8IUFoyLO7-p3hbKForc8PQR5lu3wcoqpQ_kIWRuT3e9uai7VFOZ-oZMXGnXgNrR32FVPg7ZGZBxMmTh-C_MByp9RAWa0Uqhx0cyYOe-C9uUaixXB73qigTsSSrpKGRyl96e5WqCwDeztG8XCLMiSBceZW8JSLBL-Kt10xIuSHue0bnDz6kH5kdgnc_b6l1Q5EWYIVM_BmWGj0yq5WF0cPFHlOc2rjcLZFiVsY6M0kiMIFN1EdJskP_4JS3UgnP7QwYCjUvalpJUiU85Qri_SvVqvZeXcQfTiD8BX_nT59IlopD0JIRL8ajc3RQS6g8mYNdFkzKz2jSADuryTW-yFQMo0IoYfZQLX1Xs9FrQVYc
ttl:
example: 10
msg:
example: connected
token_id:
example: 42
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalServerError'
'503':
$ref: '#/components/responses/ServiceUnavailable'
/tauth/1.0/token/{token_id}/:
put:
operationId: putapitoken
summary: Extend an API Token
description: Used to extend the expiraton time of the API Token provided as the Bearer token. The token is extended by the Time to Live value set by the API Client. The id of the token is required. It is important to note that, when this request completes, a new token is generated along with a new token_id. The new token must be used as the Bearer token in subsequent API calls. The original token is invalid and has been deleted.
tags:
- API Token Authentication
parameters:
- $ref: '#/components/parameters/token_id'
responses:
'200':
description: 'The above command returns results like this:'
content:
application/json:
schema:
properties:
code:
example: '0'
expires:
example: '2022-02-03T19:27:01.872Z'
token:
example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJEZXZpY2U0MiIsInRva2VuX2lkIjo0MCwiY2xpZW50X2lkIjo2LCJleHAiOjE2NDM5MTY0MjEsImV4aSI6NjAwfQ.Uko8axOaUuJDt6IRsNZhzBZSrAG_0jMyHHJGN3x3i3PqA-xaVO3P5djud3D7Jz4GkYolEZQSudMB9FE8NPQXVCjjuUVMbGKmBele_oIxnC1dAwnJ0H2ZDC2AM1GO-8685nmi39wMEPrtfm0PbY8KW4uB4_BJOQWVv4GYd_J_c4wxQ-THKRir8fFRyNO5Jjr220-Irn6Le2zV4DqoSbLG88gATjECbUSKyBIQwwB_zPHe05xYyP5DCKF7FRAl5kab1HZYWJ_0FBVYyqddSgZxQ4und3u5TgIVtp3VXrFdOKFAmj9pAK8kNieApxb4-NY2jZYmwGZpu3yca-tULj3q-dn3RXq5niZBD1cJqvsI-fkiOrD_OMvraR95OJqEo93OWILbS5rXXQAHS_zONkKkoEKe1kCb7EzW59-Z8eQI0UxgtYJM238ZCLxvucIjg518zSsxDOV7TK875FL-WyCiRZ4N86gbCHJvWkfqCb1Dx5MojgujMOG0LkE2zs9LMyftUDFx1MYf756xgt-iILZyQFD1Su-uHHjqV1Pb5_-fqTWg3XfD3ALNmmX8mdEux_GPRbeaHTSASaRtVXJVDrqLO18rg93xraTKF1J1IvgtxjI3bPSQ99o3z_LK1sSg0dFcUJw3dHb3OG-jaW3KnGRkKlCldFaWsb1eL9HP4nxL1wU
ttl:
example: 10
msg:
example: connected
token_id:
example: 43
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalServerError'
'503':
$ref: '#/components/responses/ServiceUnavailable'
delete:
operationId: deleteapitoken
summary: Delete an API Token
description: Used to deelete the API Token provided as the Bearer token. The token is deleted thus preventing it from validating in subsequent API call. The id of the token is required.
tags:
- API Token Authentication
parameters:
- $ref: '#/components/parameters/token_id'
responses:
'200':
description: 'The above command returns results like this:'
content:
application/json:
schema:
properties:
msg:
example: API Token deleted
code:
example: '0'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalServerError'
'503':
$ref: '#/components/responses/ServiceUnavailable'
components:
responses:
Forbidden:
description: Forbidden (The resource requested is hidden)
content:
application/json:
example:
errors:
- code: 403
reason: Forbidden
title: Forbidden
detail: The resource requested is hidden
BadRequest:
description: Bad Request (A validation exception has occurred.)
content:
application/json:
example:
errors:
- code: 400
reason: BAD_REQUEST
title: The error response code title.
detail: Details of the error response.
Unauthorized:
description: Unauthorized (Invalid credentials.)
content:
application/json:
example:
errors:
- code: 401
reason: Unauthorized
title: Unauthorized
detail: Invalid credentials.
InternalServerError:
description: Internal Server Error (A required parameter is missing or there is an issue with the server. Check the returned 'msg' field from the call.)
content:
application/json:
example:
errors:
- code: 500
reason: Internal Server Error
title: Internal Server Error
detail: A required parameter is missing or there is an issue with the server. Check the returned 'msg' field from the call.
NotFound:
description: Not Found (The specified resource could not be found)
content:
application/json:
example:
errors:
- code: 404
reason: Not Found
title: Not Found
detail: The specified resource could not be found.
ServiceUnavailable:
description: Service Unavailable (Please check if your Device42 instance is working normally.)
content:
application/json:
example:
errors:
- code: 503
reason: Service Unavailable
title: Service Unavailable
detail: Please check if your Device42 instance is working normally.
parameters:
token_id:
name: token_id
in: path
description: The id of the token
required: true
schema:
type: integer
securitySchemes:
basicAuth:
type: http
scheme: basic
description: Basic authentication using a Device42 user's username and password.
bearerAuth:
type: http
scheme: bearer
description: Bearer token obtained from POST /tauth/1.0/token/ using an API Client's key/secret as Basic auth credentials.