ad_integration icon indicating copy to clipboard operation
ad_integration copied to clipboard

Erro de forbiden

Open danillo10 opened this issue 3 years ago • 0 comments

Tentei a requisição pelo laravel e obtive erro de 403 como ficou a request

$auth_host = 'auth.olx.com.br/oauth/token';

    # dados necessários para a requisição do token de acesso
    $fields = array(
        'code' => $code,
        'client_id' => '52e213308e9d882584498ed90074bba58250c54e',
        'client_secret' => 'db016607c4395f05df1eeb1f18e93ae2',
        'redirect_uri' => 'https://localhost:8000/olx/retorno',
        'grant_type' => 'authorization_code'
    );

    $response = Http::post("https://{$auth_host}/oauth/token", $fields);
    # separa o header do body do pacote http
    print_r($response); // 403 forbiden

danillo10 avatar Oct 17 '21 19:10 danillo10