OAuth2.0 (1.0)

Download OpenAPI specification:Download

クライアントとMapray Cloud間のOAuth2.0に関連するAPI群です。

oauth

OAuth2.0 (1.0.0)

Authorization Endpoint

Issue authorization code.

Request Body schema: application/x-www-form-urlencoded
response_type
required
string
Value: "code"
client_id
required
string

ID of the organization.

redirect_uri
required
string

URI to redirect after authentication.

code_challenge
required
string

"code_verifier" calculated with SHA256 and encoded with Base64.

code_challenge_method
required
string
Value: "S256"
state
required
string

Unique string for each request for CSRF countermeasures.

Responses

Request samples

Content type
application/x-www-form-urlencoded
response_type=code&client_id=9876543210123456&redirect_uri=https%3A%2F%2Fclient.com%2Fcallback&code_challenge=OWY4NmQwODE4ODRjN2Q2NTlhMmZlYWEwYzU1YWQwMTVhM2JmNGYxYjJiMGI4MjJjZDE1ZDZjMTViMGYwMGEwOA%3D%3D&code_challenge_method=S256&state=abcde12345

Token Endpoint

Issue a new access token.

Request Body schema: application/x-www-form-urlencoded
client_id
required
string

ID of the organization.

client_secret
string

Client token string of organization.

grant_type
required
string
Enum: "authorization_code" "client_credentials" "refresh_token"
code
string

Authorization code. Required for authorization_code.

redirect_uri
string

Same as the URL sent by the authorization endpoint. Required for authorization_code.

code_verifier
string

Uncalculated value of "code_challenge". Required for authorization_code.

refresh_token
string

Refresh token string. Required for refresh_token.

Responses

Request samples

Content type
application/x-www-form-urlencoded
Example
client_id=9876543210123456&grant_type=authorization_code&code=HIJKLMNOPQRSTUVWXYZ0123456789abcd&redirect_uri=https%3A%2F%2Fclient.com%2Fcallback&code_verifier=test

Response samples

Content type
application/json
Example
{
  • "access_token": "abcdefghijklmnopqrstuvwxyzABCD0123456789",
  • "token_type": "bearer",
  • "expires_in": 3600,
  • "refresh_token": "OPQRSTUVWXYZ0123456789abcd"
}

Introspect Token

Ask if the access token is active.

Request Body schema: application/x-www-form-urlencoded
client_id
required
string

id of the organization

client_secret
required
string

client token string of organization

token
required
string

Access token string or refresh token string to introspect.

Responses

Request samples

Content type
application/x-www-form-urlencoded
client_id=9876543210123456&client_secret=ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcd&token=abcdefghijklmnopqrstuvwxyzABCD0123456789

Response samples

Content type
application/json
Example
{
  • "active": true,
  • "scope": [
    ],
  • "client_id": "9876543210123456",
  • "token_type": "bearer",
  • "exp": 1617249600,
  • "iat": 1617246000,
}

Revoke Token

Revoke access token.

Request Body schema: application/x-www-form-urlencoded
client_id
required
string

id of the organization

client_secret
required
string

client token string of organization

token
required
string

Access token string or refresh token string to revoke.

Responses

Request samples

Content type
application/x-www-form-urlencoded
client_id=9876543210123456&client_secret=ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcd&token=abcdefghijklmnopqrstuvwxyzABCD0123456789

Response samples

Content type
application/json
{ }