Legacy: Tyk Classic PortalYou’re viewing documentation for the Tyk Classic Portal, which is no longer actively maintained.If you’re looking for the latest API documentation for the new Tyk Developer Portal, please refer to the
Postman collection or visit the
Tyk Developer Portal section.The Classic Portal is in maintenance mode and will be deprecated soon. For questions or support, contact us at
support@tyk.io.
Introduction
We are going walk you through a basic integration of Tyk with Okta using the OpenID Connect Dynamic Client Registration protocol. Our current implementation provides support for the client credentials flow with support for . The user journey is as follow:- A developer signs up and creates a Dynamic Client Registration provider using the Developer Portal.
- Tyk sends the Dynamic Client Registration call to your . The IDP replies with the client ID and secret.
- Using that information, the developer (or the application) triggers a call to the token endpoint of the IDP.
- The developer (or the application) then triggers a call to Tyk, using the token that was generated by the IDP. Tyk validates this token using the provided by the IDP.
Requirements
- An OKTA account (a trial account should be enough).
- A Tyk Self Managed installation (Gateway + Dashboard).
Getting started with OKTA
First signup to OKTA, the initial screen looks like:



Setting up Tyk
Now you’re ready to set up Tyk. For compatibility reasons, check yourtyk_analytics.conf
and make sure that a proper oauth_redirect_uri_separator
parameter is set. You may use the following value:


Where do I get the proper JWKS URI for my Keycloak environment?From the OKTA Dashboard, open the API section under Security, take the base URL from the default Authorization Server and append the
/v1/keys
suffix, e.g. https://tyk-testing.okta.com/oauth2/default/v1/keys
."sub"
and for Policy Field Name use "pol"
.
- Click Save
- Select Policies under System Management
- Click Create a Policy and call it OKTA Policy. Use the default values for this policy.
- In the Access rights section, select your previously created OKTA API. You will also need to enter an expiration setting for your keys.

- Click Catalog under Portal Management on the navigation menu.
- Click Add New API, enter a name for it and select the newly created policy. Again, you will use OKTA API:

- Click Save then open the API added again
- Open the Settings tab.
-
In API Details select the Override global settings option.
Tyk lets you set global portal settings that apply to all portal-listed APIs, in this guide we assume you’re enabling and setting up DCR for a single API. In case you want to enable DCR for all the APIs, you should go to the Settings section under Portal Management, and in the API Access tab you can enter your DCR settings there.
- Scroll down to the DCR section and enter the following settings:

- Client Credentials
- Implicit
- Authorization Code
https://tyk-testing.okta.com/
Client Registration Endpoint: OpenID Connect client registration endpoint. The value we use is https://tyk-testing.okta.com/oauth2/v1/clients
This value is found in your well-known discovery document as registration_endpoint
. The well-known location URL is typically https://tyk-testing.okta.com/.well-known/openid-configuration
(replace “tyk-testing” with your org.).
Initial Registration Access Token: the token that’s used to register new clients, this was generated in the early steps of the guide.
A note on grant types and response types in OKTAIt’s important to note that OKTA’s DCR endpoint supports a parameter called
"application_type"
, the application types aren’t standard across all IDPs, while the initial specification mentions "native"
or "web"
types, some IDPs implement their own. In the current implementation Tyk supports the usage of the "web"
application type which is necessary in supporting the client credentials flow that’s described in this guide, as well as others, this is set automatically when OKTA is set as the provider. Currently, the ability to change the application type is available with the Enterprise Developer Portal.Testing the flow
Now that both Tyk and OKTA are ready we can test the complete flow.- Click Developers under Portal Management
- Click on Add developer and create a developer user.




https://[org].okta.com/oauth2/default/v1/token
Your Postman request should contain the following body, where "client_id"
and "client_secret"
are the credentials you got from the developer portal:

"tyk"
scope as value.
Once we get a response from the IDP, we can copy the "access_token"
and use it to access our OKTA API, this request will be proxied by Tyk:
