Quantcast
Channel: DreamFactory Forum - Latest topics
Viewing all articles
Browse latest Browse all 1523

Bad Request. No token or API key provided

$
0
0

@teksuser wrote:

I am trying to call other API using POST method. Also sending API key and session token in header. But it is returning error "Bad request. No token or api key provided.". Following is my code:
$options = [];
$options['headers'] = [];
$options['headers']['Content-Type'] = 'application/json';
$options['headers']['X-DreamFactory-Api-Key'] = $platform['session']['api_key'];
$options['headers']['X-DreamFactory-Session-Token'] = $platform['session']['session_token'];
$api= $platform["api"];
$post= $api->post;
$result = $post($url, $postbody,$options);

Can anyone please tell me what is wrong in above code?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 1523

Trending Articles