problem with authorization
this is my auth type
OAuth Type: Authorization Code/Implicit
so i redirect user to to auth page
after clicking access , it'll redirect back to website with code , stat parameters
according to the documentation , this code should work as access token for api calls but it doesn't work
i thought maybe i need to refresh and get token by sending a post request to
https://authz.constantcontact.com/oauth2/default/v1/token
so i send this post request
$response = $client->request('POST', 'https://authz.constantcontact.com/oauth2/default/v1/token' , [
'form_params' => [
'client_id' => env('CONSTANTCONTACT_CLIENT_ID') ,
'redirect_uri' => env('CONSTANTCONTACT_REDIRECT_URI'),
'code' => $code,
'code_verifier' => 'somerandomstring',
],
'headers' => [
'Content-Type' => 'application/x-www-form-urlencoded',
'Accept' => 'application/json'
]
]);
and i get
{"error":"invalid_client","error_description":"Client authentication failed. Either the client or the client credentials are invalid."}
im so confused nothing seems to work as documentation says
4 replies
Featured Discussions:
New to the community? Say hello and introduce your business.