Forum Discussion
Zuv
9 years agoFrequent Visitor
Bad token (probably) on rest api call to Patch GatewayDatasource (403 Forbidden error)
Hello guys, I am trying to update datasource credentials of dataset, first I am getting response of "Get GetBoundGatewayDatasources" with ID and Gateway id without any problems Later on I am call...
- 9 years ago
Ok, seems like small error - I need to use
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
instead of:
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));And yeah, I need to use AppKey instead of Token, or at least I can't working it with token.
Zuv
9 years agoFrequent Visitor
Ok, seems like small error - I need to use
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
instead of:
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
And yeah, I need to use AppKey instead of Token, or at least I can't working it with token.