Skip to content

Oauth headers with post() #295

@Budsy

Description

@Budsy

It seems that using addHeader on a post call is not working for me. Can anyone see why?

This fails to execute, (white screen, even when wrapped in try/catch block.):

`

$response = \Httpful\Request::post($url . '?' . $data . '&is_quicksend=true')
->addHeader('Authorization', 'Zoho-oauthtoken ' . $access_token)
->expectsJson()
->sendsJson()
->send();
`

But the following with addHeader stubbed out succeeds in running the post, but of course will not authenticate with Zoho Sign:

`

       $response = \Httpful\Request::post($url . '?' . $data . '&is_quicksend=true') 
                             
	 // ->addHeader('Authorization', 'Zoho-oauthtoken ' .  $access_token) 
	 		 		 
	  ->expectsJson()
	   		   		  
	  ->sendsJson()
	   		   		  
	  ->send();`

The response payload coming back from Zoho Sign API in the latter case is:

{"code":9031,"message":"Ticket invalid","status":"failure"}

The token and header formation are valid when sent through Curl on a command line, so it's not the token or the header formation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions