Erro na requisição: 405 Client Error: Method Not Allowed

0 votes

Hi, I am sending the following request:

import requests

def generate_embedded_signing_url(api_key, package_id, instance_url):
url = f"{instance_url}/api/packages/{package_id}/roles/{roleId}/signingUrl"

headers = {
"Accept": "application/json",
"Content-Type": "application/json",
"Authorization": f"Basic {api_key}"

payload = {
"roleId": roleId,
"packageId": package_id,
"url": ""

http_proxy = ""
https_proxy = ""

proxies = {
"http": http_proxy,
"https": https_proxy

response =, headers=headers, proxies=proxies)
response.raise_for_status() # Verifica se a resposta foi bem-sucedida (status 2xx)
data = response.json()
return data
except requests.exceptions.RequestException as e:
print("Erro na requisição:", e)
return None

api_key = "api key"
package_id = "id_package"
instance_url = ""
signing_url = generate_embedded_signing_url(api_key, package_id, instance_url)
if signing_url:
print("URL da Cerimônia de Assinatura Incorporada:", signing_url)
print("Falha ao gerar o URL da Cerimônia de Assinatura Incorporada.")

However, I am getting the return: Request error: 405 Client Error: Method Not Allowed

can you help me?

Approved Answer

Reply to: Erro na requisição: 405 Client Error: Method Not Allowed

0 votes

Hi Matheus,


In order to get the signing url, try with a GET call without payload, like below:




Duo Liang OneSpan Evangelism and Partner Integrations Developer

Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off