v51

latestOpenAPI 3.0.3Mozilla Public License Version 2.0raw.githubusercontent.com2026-08-0165205256.0 KB
OAuth

Create new OAuth client

Any OAuth keys must be generated with the help of a client ID. These need to be pre-registered with Tyk before they can be used (in a similar vein to how you would register your app with Twitter before attempting to ask user permissions using their API). <br/><br/> <h3>Creating OAuth clients with Access to Multiple APIs</h3> New from Tyk Gateway 2.6.0 is the ability to create OAuth clients with access to more than one API. If you provide the api_id it works the same as in previous releases. If you don't provide the api_id the request uses policy access rights and enumerates APIs from their setting in the newly created OAuth-client.

post/tyk/oauth/clients/create

Request body

api_idstring
client_idstring
descriptionstring
meta_dataobject nullable
policy_idstring
redirect_uristring
secretstring

Example request

{
  "api_id": "keyless",
  "client_id": "2a06b398c17f46908de3dffcb71ef87b",
  "description": "google client login",
  "redirect_uri": "https://httpbin.org/ip",
  "secret": "MmQwNTI5NGQtYjU0YS00NjMyLWIwZjktNTZjY2M1ZjhjYWY0"
}

Response

Client created

api_idstring
client_idstring
descriptionstring
meta_dataobject nullable
policy_idstring
redirect_uristring
secretstring

Example response

{
  "api_id": "keyless",
  "client_id": "2a06b398c17f46908de3dffcb71ef87b",
  "description": "google client login",
  "redirect_uri": "https://httpbin.org/ip",
  "secret": "MmQwNTI5NGQtYjU0YS00NjMyLWIwZjktNTZjY2M1ZjhjYWY0"
}