def METHOD_NAME(self):
    self.ensure_one()
    if not self.application_key or not self.application_secret or not self.endpoint:
        raise UserError(
            _(
                "The endpoint, the application key and the application secret "
                "must be set before validation."
            )
        )
    client = ovh.Client(
        endpoint=self.endpoint,
        application_key=self.application_key,
        application_secret=self.application_secret,
    )
    # Request RO, /me/bill* API access
    ck = client.new_consumer_key_request()
    ck.add_rules(ovh.API_READ_ONLY, "/me/bill*")
    # Request validation
    validation = ck.request()
    if not validation["validationUrl"] or not validation["consumerKey"]:
        raise UserError(_("The request to generate the consumer key failed."))
    self.write(
        {
            "validation_url": validation["validationUrl"],
            "consumer_key": validation["consumerKey"],
            "state": "step3",
        }
    )
    return self.action_continue_wizard()