Title: Initial configuration
Last modified: June 20, 2024

---

# Initial configuration

 *  Resolved [Matteo182](https://wordpress.org/support/users/matteo182/)
 * (@matteo182)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/initial-configuration-4/)
 * Hi again, thanks for the help
 * I configured the plugin as explained in the repository:
 * I created the two keys and inserted them into the wp-config before require_once
   ABSPATH and
 * i created another plugin to insert my client with this filter
 * add_filter( ‘oidc_registered_clients’, ‘my_oidc_clients’ );
 * but now if I go to the page /.well-known/openid-configuration it continues to
   give me error 404
 * and even if I call with postman this endpoint /wp-json/openid-connect/authorize
   i get this message :
 * {
 *     “code”: “rest_no_route”,
 *     “message”: “No path provides a match between the URL and the requested method.”,
 *     “data”: {
 *         “status”: 404
 *     }
 * }
 * what did I do wrong?
 * Are there any endpoint initializations missing?
 * How can I make a test call?
 * thank you very much

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Paulo Pinto](https://wordpress.org/support/users/psrpinto/)
 * (@psrpinto)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/initial-configuration-4/#post-17838910)
 * I think this might be related to this issue: [https://github.com/Automattic/wp-openid-connect-server/issues/81](https://github.com/Automattic/wp-openid-connect-server/issues/81)
 * Could you try changing the permalink structure as described in the issue and 
   see if the problem persists?
 *  Thread Starter [Matteo182](https://wordpress.org/support/users/matteo182/)
 * (@matteo182)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/initial-configuration-4/#post-17839157)
 * I tried to modify the permalinks as it says in the link you wrote to me, if I
   use the permalinks with Simple structure, the first one so to speak, if I make
   the call it replies by sending me the home page, I don’t know if this is correct,
   I was expecting an answer via json ?
 * however, if I use any other structure it always gives me a 404 error, even if
   I use the custom structure and remove the / at the end, it always gives me a 
   404.
 * Maybe I need to call the endpoint by sending it the user’s email?
 *  Thread Starter [Matteo182](https://wordpress.org/support/users/matteo182/)
 * (@matteo182)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/initial-configuration-4/#post-17839337)
 *     ```wp-block-code
       I think I solved the permalink problem, i add .'/v1', at the end of prefix , the function is : add_action(            'rest_api_init',            function () use ( $route, $methods, $args ) {                register_rest_route(                    self::PREFIX.'/v1',                    $route,                    array(                        'methods'             => $methods,                        'permission_callback' => '__return_true',                        'callback'            => array( $this, 'handle_rest_request' ),                        'args'                => $args,                    )                );            }        );
       ```
   
 * and now the respons with Postman is :
 *     ```wp-block-code
       {    "code": "rest_missing_callback_param",    "message": "Parametro(i) mancante(i): client_id, response_type",    "data": {        "status": 400,        "params": [            "client_id",            "response_type"        ]    }}
       ```
   
 * the answer is like this because I’m not calling from the client URL I registered
   right? But was the v1 endpoint registered correctly?
 *  Thread Starter [Matteo182](https://wordpress.org/support/users/matteo182/)
 * (@matteo182)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/initial-configuration-4/#post-17840646)
 * i make this call /wp-json/openid-connect/v1/authorize?response_type=code&client_id
   =postman&scope=openid profile&redirect_uri=https%3A%2F%2Fwww.getpostman.com%2Foauth2%
   2Fcallback
 * and i register the client in this way :
 *     ```wp-block-code
       add_filter( 'oidc_registered_clients', 'iquii_oidc_clients' );function iquii_oidc_clients() {    return array(        'client_id_random_string' => array(            'name' => 'postman',            'secret' => 'a secret string',            'redirect_uri' => 'https://www.getpostman.com/oauth2/callback',            'grant_types' => array( 'authorization_code' ),            'scope' => 'openid profile',        ),    );}
       ```
   
 * but i receve this error:
 * {
 *     “error”: “invalid_client”,
 *     “error_description”: “The client id supplied is invalid”
 * }
 * Did I make a mistake in recording the client or the call?
    -  This reply was modified 1 year, 11 months ago by [Matteo182](https://wordpress.org/support/users/matteo182/).
 *  Thread Starter [Matteo182](https://wordpress.org/support/users/matteo182/)
 * (@matteo182)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/initial-configuration-4/#post-17840854)
 * ok I understood the error, I modified the random string of the array index
 *     ```wp-block-code
       add_filter( 'oidc_registered_clients', 'iquii_oidc_clients' );function iquii_oidc_clients() {    return array(        'postman' => array(            'name' => 'postman',            'secret' => 'a secret string',            'redirect_uri' => 'https://www.getpostman.com/oauth2/callback',            'grant_types' => array( 'authorization_code' ),            'scope' => 'openid profile',        ),    );}
       ```
   

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Initial configuration’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/openid-connect-server.svg)
 * [OpenID Connect Server](https://wordpress.org/plugins/openid-connect-server/)
 * [Support Threads](https://wordpress.org/support/plugin/openid-connect-server/)
 * [Active Topics](https://wordpress.org/support/plugin/openid-connect-server/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/openid-connect-server/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/openid-connect-server/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Matteo182](https://wordpress.org/support/users/matteo182/)
 * Last activity: [1 year, 11 months ago](https://wordpress.org/support/topic/initial-configuration-4/#post-17840854)
 * Status: resolved