• [deleted]

  • Edited

diegoc Should be

$header = array(
    "Authorization: Token xE7NDf19NN6F8gDg9aofTUGCbR8akDOdEdogcewG",
    "Content-Type: application/json",
);

Note, that the token above is purely for example purposes, and doesn't actually exist

    [deleted] Just did so, but it still gives me the same error:
    {"errors":[{"status":"400","code":"csrf_token_mismatch"}]}Checking https://blog.uclfilm.com/2021/02/07/jftfp-2021-labyrinth-of-cinema-review/
    This does not exist...processing

      • [deleted]

      diegoc Odd. Which version of Flarum are you running ? Can you provide the output of php flarum info ?

        [deleted]

        Flarum core 0.1.0-beta.15
        PHP version: 7.4.3
        Loaded extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, pcntl, Reflection, SPL, session, standard, sodium, mysqlnd, PDO, xml, bz2, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, gmp, iconv, imagick, json, exif, mysqli, pdo_mysql, Phar, posix, readline, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, zip, Zend OPcache
        +------------------------------+----------------+--------+
        | Flarum Extensions | | |
        +------------------------------+----------------+--------+
        | ID | Version | Commit |
        +------------------------------+----------------+--------+
        | flarum-lang-english | v0.1.0-beta.15 | |
        | flarum-flags | v0.1.0-beta.15 | |
        | flarum-emoji | v0.1.0-beta.15 | |
        | flarum-bbcode | v0.1.0-beta.15 | |
        | flarum-approval | v0.1.0-beta.15 | |
        | fof-formatting | 0.3.1 | |
        | fof-oauth | 0.2.1 | |
        | flarum-likes | v0.1.0-beta.15 | |
        | flarum-lock | v0.1.0-beta.15 | |
        | flarum-markdown | v0.1.0-beta.15 | |
        | flarum-mentions | v0.1.0-beta.15 | |
        | flarum-statistics | v0.1.0-beta.15 | |
        | flarum-tags | v0.1.0-beta.15 | |
        | flarum-suspend | v0.1.0-beta.15 | |
        | flarum-subscriptions | v0.1.0-beta.15 | |
        | flarum-sticky | v0.1.0-beta.15 | |
        | nearata-embed-video | v1.1.1 | |
        | v17development-seo | 1.5.1 | |
        | flarum-pusher | v0.1.0-beta.15 | |
        | askvortsov-pwa | v2.0.2 | |
        | fof-links | 0.5.4 | |
        | fof-polls | 0.3.2 | |
        | fof-sitemap | 0.6.0 | |
        | fof-byobu | 0.6.1 | |
        | fof-stopforumspam | 0.4.0 | |
        | fof-default-user-preferences | 0.3.1 | |
        | fof-user-bio | 0.4.2 | |
        +------------------------------+----------------+--------+
        Base URL: https://forum.uclfilm.com
        Installation path: /var/www/flanew2
        Debug mode: off

          • [deleted]

          diegoc Thanks. Can you contact me on Discord - phenomlab#4801 ? I'll need to see the script you have but for obvious sensitivity reasons, don't post that here 🙂

            9 days later

            diegoc I have had this exact same issue myself in the past.
            There are a couple of things that I would like to confirm with regards to this one please.

            To begin with, can you please confirm the user account that you are using to access the API token, and to post the thread?

              diegoc Thanks Diego.
              Can you please paste a screenshot of the API entry in your database? Of course, obfuscate any sensitive data please.
              This is so that I can cross-reference and rule out any configuration issues 🙂

                diegoc You're missing the User_id key value, though I believe that @[deleted] has managed to sort this with you.

                  10 days later

                  can we create a reply in specific discussions using the flarum-api-client ?

                  I can't find any docs relating to the API

                  Hey [deleted],

                  Just wanted to let you know. By default in Flarum you can only have a title limit of 80. I saw in your post history you have (likely) edited yours to be custom.

                  For the average user of Flarum, me included, I have posts not being made because of the limitation.

                  A quick, very dirty, work around is as follows

                  $subject = $item->get_title();
                  to
                  $subject = substr($item->get_title(), 0, 79);

                  This functions as a horrible fix, but will mean all posts made by any user setting this up works.

                    Another quick question.

                    If I wanted multiple tags added, how would I go about that? Its submitted to DB as a seperate entry rather than say 1, 2 with comma seperators.