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
------------------------------
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
------------------------------
Related Content
- 4 months ago
- 3 months ago
- 4 months ago
- 5 months ago