Forum Discussion

Zuv's avatar
Zuv
Frequent Visitor
9 years ago
Solved

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...
  • Zuv's avatar
    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.