Forum Discussion
A snippet of my code:
$QuickBaseAPI = new QuickBaseRestAPI($user_token, $app_token, $realm, $user_agent);
$QuickBaseAPI->get_and_set_temporary_access_token($query_table);
$video_url = $QuickBaseAPI->query_for_data($query_table, $select , $where);
​$user_token and $user_agent are empty strings.
I added get_and_set_temporary_access_token because I was getting an error in query_for_data saying the access_token was empty. Now I'm getting a "Bad Request" inside of get_and_set_temporary_access_token from line 91.
Any suggestions on what might be awry here? Happy to share more code if needed.
------------------------------
Jeremy Lahners
LeadBaller
------------------------------
- JosephHarburg3 years agoQrew Trainee
Hi Jeremy,
Thank you for reaching out.
It appears to me that the get_and_set_temporary_access_token() method is not working properly.Which means I need to take a look at that code and resolve that issue. My apologies!
Once I figure out what's wrong, I'll reply to this thread and push the fix to github.
While I get the issue fixed, I know it should work if you create a user token and store it in your WordPress wp-config.php file as a constant. That is if you are comfortable doing that.
Here is some documentation on how to create one:
Here is what that would look like with a user token:
In your wp-config.php file add this line where appropriate:
define('QUICKBASE_USER_TOKEN', 'TOKENHERE');
Then when you instantiate a new QuickBaseRestAPI it would look like this:
$QuickBaseAPI = new QuickBaseRestAPI(QUICKBASE_USER_TOKEN, $app_token, $realm, $user_agent);
p.s. you can also store your app token in wp-config as well.
If you run into any issues with this please let me know and I will help out how I can.
Thanks!
------------------------------
Joseph Harburg
------------------------------- JeremyLahners3 years agoQrew CadetIt looks like it is related to the latest code checkin. In the repo the extra $ is still on line 48. I tracked that down and am getting responses now. Also, I am not using the get_and_set method now, it appears to work without that function call.
------------------------------
Jeremy Lahners
LeadBaller
------------------------------- JosephHarburg3 years agoQrew Trainee
Jeremy,
Awesome thank you for pointing that out.Rookie mistake on my part, appreciate you catching that and letting me know, I have updated the repo.
That being said, I am also still getting an "internal error" response on my end as well on the get_and_set method so I will still have to do some more debugging to figure out how to fix it.
Please feel free to reach out if you find any more issues or want to contribute to the repo yourself.
------------------------------
Joseph Harburg
------------------------------
Related Content
- 18 days ago
- 4 months ago
- 5 months ago
- 5 months ago