openapi: 3.2.0 info: version: 1.0.0 title: OAuth Token API description: This API grants access tokens that can be used to access your other APIs. Access tokens must use the client credentials grant type and require the client key and secret from an authorized application. You do not need to enable this API with your application to access it. servers: - url: https://api.wisc.edu/oauth security: - basicAuth: [] tags: - name: Token paths: /token: post: summary: Request a new access token description: Request a new access token with the client credentials grant type using the client key and secret from an authorized application. Pass the client key and secret values as an HTTP-Basic Authorization header, as described in IETF RFC 2617. To do this, you must base64-encode the result of joining the two values together with a colon separating them. requestBody: content: application/x-www-form-urlencoded: schema: properties: grant_type: description: Type of OAuth access token grant default: client_credentials type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/access_token' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/error' tags: - Token components: schemas: access_token: properties: access_token: description: The access token string as issued by the authorization server type: string example: NybGHmFc6e3tkZaO1T6vUZIqRKBK token_type: description: The type of token this is type: string example: Bearer expires_in: description: The number of seconds until the token expires type: integer example: 3600 scope: description: The granted scope, if the user modified the scope type: string example: create api_product_list: description: The list of APIs that can be accessed type: string example: '[sampleAPI]' api_product_list_json: description: The list of APIs that can be accessed type: array items: description: API name example: sampleAPI type: string organization_name: description: Name of the organization that generated the token type: string example: doit-ipt-apigee-dev-808d developer.email: description: Name of the developer who owns the application type: string example: developer@wisc.edu issued_at: description: Unix timestamp when the token was created type: integer example: 1633975654430 client_id: description: Client key used to request the access token type: string example: vtEFhNpirETN1eQ5NJZujlfqqOU6G0XqzlTrHAyQCi9uOgr6 application_name: description: Identifier of the application that requested the token type: string example: af25cbee-0467-45f1-8e2f-1cb85dd77813 status: description: Status of the access token type: string example: approved refresh_token_expires_in: description: Number of seconds until the refresh token expires type: integer example: 0 refresh_count: description: Number of times the token has been refreshed type: string example: 0 error: properties: error: description: Type of error type: string error_description: description: Details of error type: string securitySchemes: basicAuth: type: http scheme: basic