Archived topic
Error 403 licence
11 replies · Started by Helene on March 14, 2022
I have this error and i use this doc : https://docs.generatepress.com/article/403-forbidden-when-activating-license-key/
You can see the debugging information
Thank you
Hi there,
Just to confirm, are you using the Secondary API mentioned here?: https://docs.generatepress.com/article/403-forbidden-when-activating-license-key/#secondary-api
It doesn't block IPs like the primary API, so this error shouldn't happen there.
Let me know :)
This is in my functions.php...
/* 403 */
add_filter( 'pre_http_request', function( $pre, $args, $url ) {
if ( 'https://generatepress.com' === $url || 'https://generatepress.com/' === $url ) {
return wp_remote_post(
'https://api.generatepress.com',
array(
'timeout' => $args['timeout'],
'sslverify' => $args['sslverify'],
'body' => $args['body'],
)
);
}
return $pre;
}, 10, 3 );
add_action( 'http_api_debug', function( $response, $context, $class, $r, $url ) {
if ( 'https://generatepress.com' !== $url && 'https://api.generatepress.com' !== $url ) {
return;
}
error_reporting( error_reporting() & ~E_NOTICE );
error_log( '------ Start GeneratePress license key debugging ------' );
error_log( '--- HTTP response or WP_Error object. ---' );
error_log( print_r( $response, true ) );
error_log( '--- HTTP transport used. ---' );
error_log( $class );
error_log( '--- HTTP request arguments. ---' );
error_log( print_r( $r, true ) );
}, 10, 5 );
thank you
What's the specific error you see on the page when you click the button to save the license key?
Hi,
The message is :
403 Forbidden. Your server is not able to communicate with generatepress.com in order to activate your license key
Thanks
Any chance you can supply temporary admin login details in the Private Information area so I can take a closer look?
Let me know :)
Of course !
thank you
Hi there,
I just tried clicking the "Update key" button and it looks like it successfully activated. Can you check?
Let me know :)
yes it's ok but can you try with this other subdomain ? same id and password
I don't understand because i try since 1 week...
thank you
Hi Helene,
Your code is added to the child theme, so I switched to the child theme click update, it seems working now :)
https://www.screencast.com/t/O1OqU6nu
Thank you !
No problem :)