-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathOAuthClientCredentials.yaml
More file actions
142 lines (140 loc) · 5.53 KB
/
OAuthClientCredentials.yaml
File metadata and controls
142 lines (140 loc) · 5.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
openapi: 3.0.3
info:
title: OAuth Client Credentials API
version: ''
description: |
The UPS OAuth Client Credentials API helps retrieve an OAuth Bearer token when the integration owner is also the UPS shipper. The integration owner uses their UPS login credentials, and the UPS account number, to receive a token that can be used in the authorization HTTP header of subsequent API calls to UPS APIs like the Ship API, Track API, etc.
- <a href="https://developer.ups.com/api/reference/oauth/client-credentials" target="_blank" rel="noopener">Client Credentials</a>
- <a href="https://github.com/UPS-API/UPS-SDKs" target="_blank" rel="noopener noreferrer">Accelerate API Integration with UPS SDKs</a>
<br><p>Try out UPS APIs with example requests using Postman and learn more about the UPS Postman Collection by visiting our <a href="https://developer.ups.com/api/reference/postman/guide"
target="_blank" rel="noopener">Postman Guide</a>. Explore API documentation and sample applications through GitHub.</p>
<a href="https://god.gw.postman.com/run-collection/29542085-b27253cb-2b42-437d-9357-e0fb74d9e456?action=collection%2Ffork&source=rip_markdown&collection-url=entityId%3D29542085-b27253cb-2b42-437d-9357-e0fb74d9e456%26entityType%3Dcollection%26workspaceId%3D7e7595f0-4829-4f9a-aee1-75c126b9d417" target="_blank" rel="noopener noreferrer">
<img src="https://run.pstmn.io/button.svg" alt="Run In Postman" style="width: 128px; height: 32px;"></a>
<a href="https://github.com/UPS-API" target="_blank" rel="noopener noreferrer">
<img src="https://www.ups.com/assets/resources/webcontent/images/gitHubButton.svg" alt="Open in GitHub " style="width: 128px; height: 32px;">
</a>
paths:
"/security/v1/oauth/token":
post:
servers:
- url: https://wwwcie.ups.com/
description: Customer Integration Environment for Client Credentials
- url: https://onlinetools.ups.com/
description: Production for Client Credentials
summary: Create Token
tags:
- OAuth Client Credentials
security:
- BasicAuth: []
operationId: CreateToken
parameters:
- in: header
name: x-merchant-id
schema:
type: string
description: 6-digit UPS account number.
required: false
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
grant_type:
type: string
description: 'Valid values: client_credentials'
default: client_credentials
required:
- grant_type
responses:
'200':
description: successful operation
content:
application/json:
schema:
"$ref": "#/components/schemas/tokenSuccessResponse"
'400':
description: Invalid Request
content:
application/json:
schema:
"$ref": "#/components/schemas/tokenErrorResponse"
'401':
description: Unauthorized Request
content:
application/json:
schema:
"$ref": "#/components/schemas/tokenErrorResponse"
'403':
description: Blocked Merchant
content:
application/json:
schema:
"$ref": "#/components/schemas/tokenErrorResponse"
'429':
description: Quota Limit Exceeded
content:
application/json:
schema:
"$ref": "#/components/schemas/tokenErrorResponse"
components:
securitySchemes:
BasicAuth:
type: http
scheme: basic
description: |
Find your Client ID and Secret on your app info page.
1. Select \"Try It\"
2. In the Security section enter your Client ID as the Username and your Secret as the Password.
3. Enter any additional information in the Body and Parameters sections.
4. Select \"Send\" to execute your API request
schemas:
tokenSuccessResponse:
type: object
properties:
token_type:
description: Container for token response.
type: string
issued_at:
description: Issue time of requested token.
type: string
client_id:
description: Client id for requested token.
type: string
access_token:
description: Token to be used in API requests.
type: string
scope:
description: Scope for requested token.
type: string
expires_in:
description: Expire time for requested token in seconds.
type: string
refresh_count:
description: Number of refreshes for requested token.
type: string
status:
description: Status for requested token.
type: string
tokenErrorResponse:
type: object
properties:
response:
"$ref": "#/components/schemas/errorResponseWrapper"
errorResponseWrapper:
type: object
properties:
errors:
type: array
items:
"$ref": "#/components/schemas/errors"
errors:
type: object
properties:
code:
description: Error code
type: string
message:
description: Error message
type: string